diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp @@ -18,10 +18,10 @@ using namespace llvm; using namespace dwarf; -enum Order : bool { InOrder, OutOfOrder }; +enum OrderKind : bool { InOrder, OutOfOrder }; -void WriteAbbreviationDeclarations(raw_ostream &OS, uint32_t FirstCode, - Order Ord) { +void writeAbbreviationDeclarations(raw_ostream &OS, uint32_t FirstCode, + OrderKind Order) { encodeULEB128(FirstCode, OS); encodeULEB128(DW_TAG_compile_unit, OS); OS << static_cast(DW_CHILDREN_yes); @@ -30,7 +30,8 @@ encodeULEB128(0, OS); encodeULEB128(0, OS); - uint32_t SecondCode = Ord == Order::InOrder ? FirstCode + 1 : FirstCode - 1; + uint32_t SecondCode = + Order == OrderKind::InOrder ? FirstCode + 1 : FirstCode - 1; encodeULEB128(SecondCode, OS); encodeULEB128(DW_TAG_subprogram, OS); @@ -46,7 +47,7 @@ raw_svector_ostream OS(RawData); uint32_t FirstCode = 5; - WriteAbbreviationDeclarations(OS, FirstCode, InOrder); + writeAbbreviationDeclarations(OS, FirstCode, InOrder); encodeULEB128(0, OS); uint64_t Offset = 0; @@ -55,7 +56,7 @@ const bool DataWasExtracted = AbbrevSet.extract(Data, &Offset); EXPECT_TRUE(DataWasExtracted); // The Abbreviation Declarations are in order and contiguous, so we want to - // make sure that FirstAbbrCode was correctly set + // make sure that FirstAbbrCode was correctly set. EXPECT_EQ(AbbrevSet.getFirstAbbrCode(), FirstCode); const DWARFAbbreviationDeclaration *Abbrev5 = @@ -78,7 +79,7 @@ raw_svector_ostream OS(RawData); uint32_t FirstCode = 2; - WriteAbbreviationDeclarations(OS, FirstCode, OutOfOrder); + writeAbbreviationDeclarations(OS, FirstCode, OutOfOrder); encodeULEB128(0, OS); uint64_t Offset = 0; @@ -86,7 +87,7 @@ DWARFAbbreviationDeclarationSet AbbrevSet; const bool DataWasExtracted = AbbrevSet.extract(Data, &Offset); EXPECT_TRUE(DataWasExtracted); - // The declarations are out of order, ensure that FirstAbbrCode is UINT32_MAX + // The declarations are out of order, ensure that FirstAbbrCode is UINT32_MAX. EXPECT_EQ(AbbrevSet.getFirstAbbrCode(), UINT32_MAX); const DWARFAbbreviationDeclaration *Abbrev2 =