Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp =================================================================== --- llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ 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()); Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp =================================================================== --- llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp +++ llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp @@ -183,7 +183,7 @@ TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffset) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); generate(); EXPECT_THAT_EXPECTED( @@ -210,7 +210,7 @@ TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffsetAfterData) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0, LineTable::Byte}}); @@ -235,7 +235,7 @@ TEST_P(DebugLineParameterisedFixture, PrologueGetLength) { #endif if (!setupGenerator(Version)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(Format); DWARFDebugLine::Prologue Prologue = LT.createBasicPrologue(); LT.setPrologue(Prologue); @@ -262,7 +262,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")); @@ -332,7 +332,7 @@ TEST_F(DebugLineBasicFixture, ErrorForReservedLength) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0xfffffff0, LineTable::Long}}); @@ -360,7 +360,7 @@ TEST_P(DebugLineUnsupportedVersionFixture, ErrorForUnsupportedVersion) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue( @@ -386,7 +386,7 @@ TEST_F(DebugLineBasicFixture, ErrorForInvalidV5IncludeDirTable) { #endif if (!setupGenerator(5)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({ @@ -431,7 +431,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")); @@ -471,7 +471,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")); @@ -530,7 +530,7 @@ TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthSmallerThanExpected) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addByte(0xaa); @@ -564,7 +564,7 @@ TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthLargerThanExpected) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addByte(0xaa); @@ -597,7 +597,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. @@ -630,7 +630,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. @@ -665,7 +665,7 @@ ErrorForMismatchedAddressSizeUnsetInitialAddress) { #endif if (!setupGenerator(4, 0)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); uint64_t Addr1 = 0x11223344; @@ -699,7 +699,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 @@ -735,7 +735,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 @@ -764,7 +764,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 @@ -803,7 +803,7 @@ TEST_F(DebugLineBasicFixture, CallbackUsedForUnterminatedSequence) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addExtendedOpcode(9, DW_LNE_set_address, @@ -948,7 +948,7 @@ void runTest(bool CheckAdvancePC, Twine MsgSuffix) { if (!setupGenerator(Version)) - return; + GTEST_SKIP(); setupTables(/*AddAdvancePCFirstTable=*/CheckAdvancePC); @@ -1130,7 +1130,7 @@ TEST_F(DebugLineBasicFixture, ParserParsesCorrectly) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); DWARFDebugLine::SectionParser Parser = setupParser(); @@ -1161,7 +1161,7 @@ TEST_F(DebugLineBasicFixture, ParserSkipsCorrectly) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); DWARFDebugLine::SectionParser Parser = setupParser(); @@ -1186,7 +1186,7 @@ TEST_F(DebugLineBasicFixture, ParserAlwaysDoneForEmptySection) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); generate(); DWARFDebugLine::SectionParser Parser(LineData, *Context, Units); @@ -1201,7 +1201,7 @@ TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenParsing) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0xfffffff0, LineTable::Long}}); @@ -1229,7 +1229,7 @@ TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenSkipping) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.setCustomPrologue({{0xfffffff0, LineTable::Long}}); @@ -1257,7 +1257,7 @@ TEST_F(DebugLineBasicFixture, ParserReportsFirstErrorInEachTableWhenParsing) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.setCustomPrologue({{2, LineTable::Long}, {0, LineTable::Half}}); @@ -1288,7 +1288,7 @@ TEST_F(DebugLineBasicFixture, ParserReportsNonPrologueProblemsWhenParsing) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.addExtendedOpcode(0x42, DW_LNE_end_sequence, {}); @@ -1326,7 +1326,7 @@ ParserReportsPrologueErrorsInEachTableWhenSkipping) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.setCustomPrologue({{2, LineTable::Long}, {0, LineTable::Half}}); @@ -1357,7 +1357,7 @@ TEST_F(DebugLineBasicFixture, ParserIgnoresNonPrologueErrorsWhenSkipping) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(DWARF32); LT.addExtendedOpcode(42, DW_LNE_end_sequence, {}); @@ -1377,7 +1377,7 @@ TEST_F(DebugLineBasicFixture, VerboseOutput) { #endif if (!setupGenerator(5)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); LT.addByte(0); // Extended opcode with zero length. @@ -1537,7 +1537,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. @@ -1719,7 +1719,7 @@ TEST_P(TruncatedExtendedOpcodeFixture, ErrorForTruncatedExtendedOpcode) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = setupTable(); LT.addExtendedOpcode(OpcodeLength, Opcode, Operands); runTest(0); @@ -1803,7 +1803,7 @@ TEST_P(TruncatedStandardOpcodeFixture, ErrorForTruncatedStandardOpcode) { #endif if (!setupGenerator()) - return; + GTEST_SKIP(); LineTable < = setupTable(); LT.addStandardOpcode(Opcode, Operands); runTest(Opcode); @@ -1863,7 +1863,7 @@ TEST_F(DebugLineBasicFixture, PrintPathsProperly) { #endif if (!setupGenerator(5)) - return; + GTEST_SKIP(); LineTable < = Gen->addLineTable(); DWARFDebugLine::Prologue P = LT.createBasicPrologue(); Index: llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp =================================================================== --- llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp +++ 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()); Index: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp =================================================================== --- llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp +++ 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. Index: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp =================================================================== --- llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp +++ 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);