diff options
author | Nigel Perks <nigelp@xmos.com> | 2020-09-14 18:17:11 +0100 |
---|---|---|
committer | Nigel Perks <nigelp@xmos.com> | 2021-03-18 09:51:00 +0000 |
commit | 251fe986afd35bc257a8b043a49bddc98473d565 (patch) | |
tree | da0aed77ab9a8fbf0a73cc8c8b96976780bc49df /llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp | |
parent | 0331399dc9346f3c5acdf784ddb96567efc9d538 (diff) | |
download | llvm-251fe986afd35bc257a8b043a49bddc98473d565.zip llvm-251fe986afd35bc257a8b043a49bddc98473d565.tar.gz llvm-251fe986afd35bc257a8b043a49bddc98473d565.tar.bz2 |
[Test][DebugInfo] Check for backend object emission support.
The XCore backend does not support object emission. Several tests fail for this
reason when XCore is the default target. See staging buildbot builder:
clang-xcore-ubuntu-20-x64.
So check for backend object emission before running the tests requiring it.
Incorporate isConfigurationSupported functionality in isObjectEmissionSupported,
to avoid calling them both in the same tests.
Differential Revision: https://reviews.llvm.org/D98400
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp')
-rw-r--r-- | llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp index 6b644b0..4cafc9a 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp @@ -42,7 +42,7 @@ namespace { template <uint16_t Version, class AddrType, class RefAddrType> void TestAllForms() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test that we can decode all DW_FORM values correctly. @@ -456,7 +456,7 @@ TEST(DWARFDebugInfo, TestDWARF32Version5Addr8AllForms) { template <uint16_t Version, class AddrType> void TestChildren() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test that we can decode DW_FORM_ref_addr values correctly in DWARF 2 with @@ -586,7 +586,7 @@ TEST(DWARFDebugInfo, TestDWARF32Version4Addr8Children) { template <uint16_t Version, class AddrType> void TestReferences() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test that we can decode DW_FORM_refXXX values correctly in DWARF. @@ -836,7 +836,7 @@ TEST(DWARFDebugInfo, TestDWARF32Version4Addr8References) { template <uint16_t Version, class AddrType> void TestAddresses() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test the DWARF APIs related to accessing the DW_AT_low_pc and @@ -1008,7 +1008,7 @@ TEST(DWARFDebugInfo, TestDWARF32Version4Addr8Addresses) { TEST(DWARFDebugInfo, TestStringOffsets) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; const char *String1 = "Hello"; @@ -1072,7 +1072,7 @@ TEST(DWARFDebugInfo, TestStringOffsets) { TEST(DWARFDebugInfo, TestEmptyStringOffsets) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; const char *String1 = "Hello"; @@ -1101,7 +1101,7 @@ TEST(DWARFDebugInfo, TestEmptyStringOffsets) { TEST(DWARFDebugInfo, TestRelations) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test the DWARF APIs related to accessing the DW_AT_low_pc and @@ -1288,7 +1288,7 @@ TEST(DWARFDebugInfo, TestDWARFDie) { TEST(DWARFDebugInfo, TestChildIterators) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test the DWARF APIs related to iterating across the children of a DIE using @@ -1397,7 +1397,7 @@ TEST(DWARFDebugInfo, TestEmptyChildren) { TEST(DWARFDebugInfo, TestAttributeIterators) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test the DWARF APIs related to iterating across all attribute values in a @@ -1459,7 +1459,7 @@ TEST(DWARFDebugInfo, TestAttributeIterators) { TEST(DWARFDebugInfo, TestFindRecurse) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; uint16_t Version = 4; @@ -1673,7 +1673,7 @@ TEST(DWARFDebugInfo, TestDwarfToFunctions) { TEST(DWARFDebugInfo, TestFindAttrs) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; // Test the DWARFDie::find() and DWARFDie::findRecursively() that take an @@ -1736,7 +1736,7 @@ TEST(DWARFDebugInfo, TestFindAttrs) { TEST(DWARFDebugInfo, TestImplicitConstAbbrevs) { Triple Triple = getNormalizedDefaultTargetTriple(); - if (!isConfigurationSupported(Triple)) + if (!isObjectEmissionSupported(Triple)) return; uint16_t Version = 5; |