2013-09-03 21:57:57 +00:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2013-12-10 11:13:32 +00:00
|
|
|
AsmPrinter
|
2016-07-29 19:19:32 +00:00
|
|
|
CodeGen
|
|
|
|
Core
|
2013-12-10 11:13:32 +00:00
|
|
|
Support
|
2013-09-03 21:57:57 +00:00
|
|
|
)
|
|
|
|
|
2013-09-03 22:08:28 +00:00
|
|
|
set(CodeGenSources
|
2013-09-03 21:57:57 +00:00
|
|
|
DIEHashTest.cpp
|
2016-07-29 16:10:57 +00:00
|
|
|
LowLevelTypeTest.cpp
|
ADT: Remove all ilist_iterator => pointer casts, NFC
Remove all ilist_iterator to pointer casts. There were two reasons for
casts:
- Checking for an uninitialized (i.e., null) iterator. I added
MachineInstrBundleIterator::isValid() to check for that case.
- Comparing an iterator against the underlying pointer value while
avoiding converting the pointer value to an iterator. This is
occasionally necessary in MachineInstrBundleIterator, since there is
an assertion in the constructors that the underlying MachineInstr is
not bundled (but we don't care about that if we're just checking for
pointer equality).
To support the latter case, I rewrote the == and != operators for
ilist_iterator and MachineInstrBundleIterator.
- The implicit constructors now use enable_if to exclude
const-iterator => non-const-iterator conversions from overload
resolution (previously it was a compiler error on instantiation, now
it's SFINAE).
- The == and != operators are now global (friends), and are not
templated.
- MachineInstrBundleIterator has overloads to compare against both
const_pointer and const_reference. This avoids the implicit
conversions to MachineInstrBundleIterator that assert, instead just
checking the address (and I added unit tests to confirm this).
Notably, the only remaining uses of ilist_iterator::getNodePtrUnchecked
are in ilist.h, and no code outside of ilist*.h directly relies on this
UB end-iterator-to-pointer conversion anymore. It's still needed for
ilist_*sentinel_traits, but I'll clean that up soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-12 05:05:36 +00:00
|
|
|
MachineInstrBundleIteratorTest.cpp
|
2013-09-03 21:57:57 +00:00
|
|
|
)
|
|
|
|
|
2013-09-03 22:08:28 +00:00
|
|
|
add_llvm_unittest(CodeGenTests
|
|
|
|
${CodeGenSources}
|
2013-09-03 21:57:57 +00:00
|
|
|
)
|
2016-07-20 21:13:29 +00:00
|
|
|
|
|
|
|
add_subdirectory(GlobalISel)
|