llvm/unittests/Support
Saleem Abdulrasool e169351252 Support: correct AArch64 TargetParser implementation
The architecture enumeration is shared across ARM and AArch64.  However, the
data is not.  The code incorrectly would index into the array using the
architecture index which was offset by the ARMv7 architecture enumeration.  We
do not have a marker for indicating the architectural family to which the
enumeration belongs so we cannot be clever about offsetting the index (at least
it is not immediately apparent to me).  Instead, fall back to the tried-and-true
method of slowly iterating the array (its not a large array, so the impact of
this is not too high).

Because of the incorrect indexing, if we were lucky, we would crash, but usually
we would return an invalid StringRef.  We did not have any tests for the AArch64
target parser previously;.  Extend the previous tests I had added for ARM to
cover AArch64 for ensuring that we return expected StringRefs.

Take the opportunity to change some iterator types to references.

This work is needed to support parsing `.arch name` directives in the AArch64
target asm parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 14:30:00 +00:00
..
AlignOfTest.cpp
AllocatorTest.cpp
ArrayRecyclerTest.cpp
BlockFrequencyTest.cpp
BranchProbabilityTest.cpp
Casting.cpp
CMakeLists.txt Add support for computing SHA1 in LLVM 2016-04-01 04:30:16 +00:00
CommandLineTest.cpp Use gcc's rules for parsing gcc-style response files 2016-04-26 13:53:56 +00:00
CompressionTest.cpp
ConvertUTFTest.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DataExtractorTest.cpp
DwarfTest.cpp
EndianStreamTest.cpp
EndianTest.cpp
ErrorOrTest.cpp
ErrorTest.cpp [Support] Rename unconvertibleErrorCode to inconvertibleErrorCode. 2016-05-27 01:54:25 +00:00
FileOutputBufferTest.cpp
formatted_raw_ostream_test.cpp
IteratorTest.cpp
LEB128Test.cpp
LineIteratorTest.cpp
LockFileManagerTest.cpp
ManagedStatic.cpp
MathExtrasTest.cpp Add tests to Support/MathExtras 2016-06-02 09:00:53 +00:00
MD5Test.cpp
MemoryBufferTest.cpp
MemoryTest.cpp
Path.cpp Revert commit r271704, a patch that enables warnings for non-portable #include and #import paths (Corresponding clang patch has been reverted by r271761). Patches are reverted because they generate lots of unadressable warnings for windows and fail tests under ASAN. 2016-06-04 03:36:12 +00:00
ProcessTest.cpp
ProgramTest.cpp Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
raw_ostream_test.cpp
raw_pwrite_stream_test.cpp
raw_sha1_ostream_test.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
RegexTest.cpp
ReplaceFileTest.cpp
ScaledNumberTest.cpp
SourceMgrTest.cpp
SpecialCaseListTest.cpp
StreamingMemoryObjectTest.cpp Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
StringPool.cpp
SwapByteOrderTest.cpp
TargetParserTest.cpp Support: correct AArch64 TargetParser implementation 2016-06-08 14:30:00 +00:00
ThreadLocalTest.cpp
ThreadPool.cpp Fix deadlock in ThreadPool unittest. 2016-06-05 21:15:46 +00:00
TimerTest.cpp Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
TimeValueTest.cpp Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
TrailingObjectsTest.cpp
TypeNameTest.cpp
UnicodeTest.cpp
YAMLIOTest.cpp [yaml] Add a ScalarTraits for mapping endian aware types. 2016-06-07 19:32:09 +00:00
YAMLParserTest.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00