diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp @@ -44,7 +44,7 @@ void TestAllForms() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test that we can decode all DW_FORM values correctly. const AddrType AddrValue = (AddrType)0x0123456789abcdefULL; @@ -478,7 +478,7 @@ template void TestChildren() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test that we can decode DW_FORM_ref_addr values correctly in DWARF 2 with // 4 byte addresses. DW_FORM_ref_addr values should be 4 bytes when using @@ -620,7 +620,7 @@ template void TestReferences() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test that we can decode DW_FORM_refXXX values correctly in DWARF. auto ExpectedDG = dwarfgen::Generator::create(Triple, Version); @@ -882,7 +882,7 @@ template void TestAddresses() { Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test the DWARF APIs related to accessing the DW_AT_low_pc and // DW_AT_high_pc. @@ -1070,7 +1070,7 @@ #endif Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); const char *String1 = "Hello"; const char *String2 = "World"; @@ -1134,7 +1134,7 @@ TEST(DWARFDebugInfo, TestEmptyStringOffsets) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); const char *String1 = "Hello"; @@ -1163,7 +1163,7 @@ TEST(DWARFDebugInfo, TestRelations) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test the DWARF APIs related to accessing the DW_AT_low_pc and // DW_AT_high_pc. @@ -1350,7 +1350,7 @@ TEST(DWARFDebugInfo, TestChildIterators) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test the DWARF APIs related to iterating across the children of a DIE using // the DWARFDie::iterator class. @@ -1459,7 +1459,7 @@ TEST(DWARFDebugInfo, TestAttributeIterators) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test the DWARF APIs related to iterating across all attribute values in a // a DWARFDie. @@ -1521,7 +1521,7 @@ TEST(DWARFDebugInfo, TestFindRecurse) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); uint16_t Version = 4; auto ExpectedDG = dwarfgen::Generator::create(Triple, Version); @@ -1735,7 +1735,7 @@ TEST(DWARFDebugInfo, TestFindAttrs) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); // Test the DWARFDie::find() and DWARFDie::findRecursively() that take an // ArrayRef value to make sure they work correctly. @@ -1798,7 +1798,7 @@ TEST(DWARFDebugInfo, TestImplicitConstAbbrevs) { Triple Triple = getNormalizedDefaultTargetTriple(); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); uint16_t Version = 5; auto ExpectedDG = dwarfgen::Generator::create(Triple, Version); @@ -1923,7 +1923,7 @@ TEST(DWARFDebugInfo, TestErrorReporting) { Triple Triple("x86_64-pc-linux"); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); auto ExpectedDG = dwarfgen::Generator::create(Triple, 4 /*DwarfVersion*/); ASSERT_THAT_EXPECTED(ExpectedDG, Succeeded()); diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp @@ -187,7 +187,7 @@ TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffset) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); generate(); EXPECT_THAT_EXPECTED( @@ -214,7 +214,7 @@ TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffsetAfterData) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0, LineTable::Byte}}); @@ -239,7 +239,7 @@ TEST_P(DebugLineParameterisedFixture, PrologueGetLength) { #endif if (!setupGenerator(Version)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(Format); DWARFDebugLine::Prologue Prologue = LT.createBasicPrologue(); LT.setPrologue(Prologue); @@ -266,7 +266,7 @@ TEST_P(DebugLineParameterisedFixture, GetOrParseLineTableValidTable) { #endif if (!setupGenerator(Version)) - return; + GTEST_SKIP(); SCOPED_TRACE("Checking Version " + std::to_string(Version) + ", Format " + (Format == DWARF64 ? "DWARF64" : "DWARF32")); @@ -336,7 +336,7 @@ TEST_F(DebugLineBasicFixture, ErrorForReservedLength) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0xfffffff0, LineTable::Long}}); @@ -364,7 +364,7 @@ TEST_P(DebugLineUnsupportedVersionFixture, ErrorForUnsupportedVersion) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue( @@ -390,7 +390,7 @@ TEST_F(DebugLineBasicFixture, ErrorForInvalidV5IncludeDirTable) { #endif if (!setupGenerator(5)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({ @@ -435,7 +435,7 @@ TEST_P(DebugLineParameterisedFixture, ErrorForTooLargePrologueLength) { #endif if (!setupGenerator(Version)) - return; + GTEST_SKIP(); SCOPED_TRACE("Checking Version " + std::to_string(Version) + ", Format " + (Format == DWARF64 ? "DWARF64" : "DWARF32")); @@ -475,7 +475,7 @@ TEST_P(DebugLineParameterisedFixture, ErrorForTooShortPrologueLength) { #endif if (!setupGenerator(Version)) - return; + GTEST_SKIP(); SCOPED_TRACE("Checking Version " + std::to_string(Version) + ", Format " + (Format == DWARF64 ? "DWARF64" : "DWARF32")); @@ -534,7 +534,7 @@ TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthSmallerThanExpected) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addByte(0xaa); @@ -568,7 +568,7 @@ TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthLargerThanExpected) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addByte(0xaa); @@ -601,7 +601,7 @@ TEST_F(DebugLineBasicFixture, ErrorForUnitLengthTooLarge) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable &Padding = Gen->addLineTable(); // Add some padding to show that a non-zero offset is handled correctly. @@ -634,7 +634,7 @@ TEST_F(DebugLineBasicFixture, ErrorForMismatchedAddressSize) { #endif if (!setupGenerator(4, 8)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); // The line data extractor expects size 8 (Quad) addresses. @@ -669,7 +669,7 @@ ErrorForMismatchedAddressSizeUnsetInitialAddress) { #endif if (!setupGenerator(4, 0)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); uint64_t Addr1 = 0x11223344; @@ -703,7 +703,7 @@ // Use DWARF v4, and 0 for data extractor address size so that the address // size is derived from the opcode length. if (!setupGenerator(4, 0)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); // 4 == length of the extended opcode, i.e. 1 for the opcode itself and 3 for @@ -739,7 +739,7 @@ // Use DWARF v4, and 0 for data extractor address size so that the address // size is derived from the opcode length. if (!setupGenerator(4, 0)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); // Specifically use an operand size that has a trailing byte of a supported @@ -768,7 +768,7 @@ // Use 0 for data extractor address size so that it does not clash with the // header address size. if (!setupGenerator(5, 0)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); // AddressSize + 1 == length of the extended opcode, i.e. 1 for the opcode @@ -807,7 +807,7 @@ TEST_F(DebugLineBasicFixture, CallbackUsedForUnterminatedSequence) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addExtendedOpcode(9, DW_LNE_set_address, @@ -952,7 +952,7 @@ void runTest(bool CheckAdvancePC, Twine MsgSuffix) { if (!setupGenerator(Version)) - return; + GTEST_SKIP(); setupTables(/*AddAdvancePCFirstTable=*/CheckAdvancePC); @@ -1134,7 +1134,7 @@ TEST_F(DebugLineBasicFixture, ParserParsesCorrectly) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); DWARFDebugLine::SectionParser Parser = setupParser(); @@ -1165,7 +1165,7 @@ TEST_F(DebugLineBasicFixture, ParserSkipsCorrectly) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); DWARFDebugLine::SectionParser Parser = setupParser(); @@ -1190,7 +1190,7 @@ TEST_F(DebugLineBasicFixture, ParserAlwaysDoneForEmptySection) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); generate(); DWARFDebugLine::SectionParser Parser(LineData, *Context, Units); @@ -1205,7 +1205,7 @@ TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenParsing) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0xfffffff0, LineTable::Long}}); @@ -1233,7 +1233,7 @@ TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenSkipping) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0xfffffff0, LineTable::Long}}); @@ -1261,7 +1261,7 @@ TEST_F(DebugLineBasicFixture, ParserReportsFirstErrorInEachTableWhenParsing) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.setCustomPrologue({{2, LineTable::Long}, {0, LineTable::Half}}); @@ -1292,7 +1292,7 @@ TEST_F(DebugLineBasicFixture, ParserReportsNonPrologueProblemsWhenParsing) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.addExtendedOpcode(0x42, DW_LNE_end_sequence, {}); @@ -1330,7 +1330,7 @@ ParserReportsPrologueErrorsInEachTableWhenSkipping) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.setCustomPrologue({{2, LineTable::Long}, {0, LineTable::Half}}); @@ -1361,7 +1361,7 @@ TEST_F(DebugLineBasicFixture, ParserIgnoresNonPrologueErrorsWhenSkipping) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.addExtendedOpcode(42, DW_LNE_end_sequence, {}); @@ -1381,7 +1381,7 @@ TEST_F(DebugLineBasicFixture, VerboseOutput) { #endif if (!setupGenerator(5)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addByte(0); // Extended opcode with zero length. @@ -1541,7 +1541,7 @@ TEST_P(TruncatedPrologueFixture, ErrorForTruncatedPrologue) { #endif if (!setupGenerator(Version)) - return; + GTEST_SKIP(); LineTable &Padding = Gen->addLineTable(); // Add some padding to show that a non-zero offset is handled correctly. @@ -1723,7 +1723,7 @@ TEST_P(TruncatedExtendedOpcodeFixture, ErrorForTruncatedExtendedOpcode) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = setupTable(); LT.addExtendedOpcode(OpcodeLength, Opcode, Operands); runTest(0); @@ -1807,7 +1807,7 @@ TEST_P(TruncatedStandardOpcodeFixture, ErrorForTruncatedStandardOpcode) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = setupTable(); LT.addStandardOpcode(Opcode, Operands); runTest(Opcode); @@ -1867,7 +1867,7 @@ TEST_F(DebugLineBasicFixture, PrintPathsProperly) { #endif if (!setupGenerator(5)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); DWARFDebugLine::Prologue P = LT.createBasicPrologue(); diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp @@ -25,7 +25,7 @@ uint16_t Version = 4; Triple Triple = getDefaultTargetTripleForAddrSize(sizeof(AddrType)); if (!isConfigurationSupported(Triple)) - return; + GTEST_SKIP(); auto ExpectedDG = dwarfgen::Generator::create(Triple, Version); ASSERT_THAT_EXPECTED(ExpectedDG, Succeeded()); diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp @@ -51,7 +51,7 @@ ArrayRef ExprData, StringRef Expected) { // If we didn't build ARM, do not run the test. if (!MRI) - return; + GTEST_SKIP(); // Print the expression, passing in the subprogram DIE, and check that the // result is as expected. diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp @@ -185,7 +185,7 @@ void DWARFExpressionCopyBytesTest::testExpr(ArrayRef ExprData) { // If we didn't build x86, do not run the test. if (!MRI) - return; + GTEST_SKIP(); DataExtractor DE(ExprData, true, 8); DWARFExpression Expr(DE, 8);