[PATCH] D151233: [DebugInfo] Follow-up to D151001
Alex Langford via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 23 10:22:19 PDT 2023
bulbazord created this revision.
bulbazord added a reviewer: jhenderson.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
I landed D151001 <https://reviews.llvm.org/D151001> before it had gotten sign-off from all the reviewers.
This is a follow-up to address the additional feedback.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151233
Files:
llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp
Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp
===================================================================
--- llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp
+++ 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<uint8_t>(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 =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151233.524790.patch
Type: text/x-patch
Size: 2460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230523/71c82e5c/attachment.bin>
More information about the llvm-commits
mailing list