diff --git a/llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp b/llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp --- a/llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp +++ b/llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp @@ -45,11 +45,11 @@ // modified before a call to `makeObj()` to test parser with invalid // input, etc. +struct MockData1 { // Use "pragma pack" to model .BTF & .BTF.ext sections content using // 'struct' objects. This pragma is supported by CLANG, GCC & MSVC, // which matters for LLVM CI. #pragma pack(push, 1) -struct MockData1 { struct B { BTF::Header Header = {}; // no types @@ -100,6 +100,7 @@ Header.LineInfoLen = sizeof(Lines); } } Ext; +#pragma pack(pop) int BTFSectionLen = sizeof(BTF); int ExtSectionLen = sizeof(Ext); @@ -148,7 +149,6 @@ return *Obj.get(); } }; -#pragma pack(pop) TEST(BTFParserTest, simpleCorrectInput) { BTFParser BTF;