Skip to content

Commit d88a0c7

Browse files
[memprof] Rename Inline to IsInlineFrame in YAML (#118901)
This patch makes the YAML field name match the struct field name.
1 parent 27e458c commit d88a0c7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ template <> struct MappingTraits<memprof::Frame> {
11591159
Io.mapRequired("Function", F.Function);
11601160
Io.mapRequired("LineOffset", F.LineOffset);
11611161
Io.mapRequired("Column", F.Column);
1162-
Io.mapRequired("Inline", F.IsInlineFrame);
1162+
Io.mapRequired("IsInlineFrame", F.IsInlineFrame);
11631163

11641164
// Assert that the definition of Frame matches what we expect. The
11651165
// structured bindings below detect changes to the number of fields.

llvm/unittests/ProfileData/MemProfTest.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -743,22 +743,22 @@ TEST(MemProf, YAMLParser) {
743743
- GUID: 0xdeadbeef12345678
744744
AllocSites:
745745
- Callstack:
746-
- {Function: 0x100, LineOffset: 11, Column: 10, Inline: true}
747-
- {Function: 0x200, LineOffset: 22, Column: 20, Inline: false}
746+
- {Function: 0x100, LineOffset: 11, Column: 10, IsInlineFrame: true}
747+
- {Function: 0x200, LineOffset: 22, Column: 20, IsInlineFrame: false}
748748
MemInfoBlock:
749749
AllocCount: 777
750750
TotalSize: 888
751751
- Callstack:
752-
- {Function: 0x300, LineOffset: 33, Column: 30, Inline: false}
753-
- {Function: 0x400, LineOffset: 44, Column: 40, Inline: true}
752+
- {Function: 0x300, LineOffset: 33, Column: 30, IsInlineFrame: false}
753+
- {Function: 0x400, LineOffset: 44, Column: 40, IsInlineFrame: true}
754754
MemInfoBlock:
755755
AllocCount: 666
756756
TotalSize: 555
757757
CallSites:
758-
- - {Function: 0x500, LineOffset: 55, Column: 50, Inline: true}
759-
- {Function: 0x600, LineOffset: 66, Column: 60, Inline: false}
760-
- - {Function: 0x700, LineOffset: 77, Column: 70, Inline: true}
761-
- {Function: 0x800, LineOffset: 88, Column: 80, Inline: false}
758+
- - {Function: 0x500, LineOffset: 55, Column: 50, IsInlineFrame: true}
759+
- {Function: 0x600, LineOffset: 66, Column: 60, IsInlineFrame: false}
760+
- - {Function: 0x700, LineOffset: 77, Column: 70, IsInlineFrame: true}
761+
- {Function: 0x800, LineOffset: 88, Column: 80, IsInlineFrame: false}
762762
)YAML";
763763

764764
llvm::memprof::YAMLMemProfReader YAMLReader;
@@ -821,7 +821,7 @@ TEST(MemProf, YAMLWriterFrame) {
821821

822822
std::string Out = serializeInYAML(F);
823823
EXPECT_EQ(Out, R"YAML(---
824-
{ Function: 11, LineOffset: 22, Column: 33, Inline: true }
824+
{ Function: 11, LineOffset: 22, Column: 33, IsInlineFrame: true }
825825
...
826826
)YAML");
827827
}

0 commit comments

Comments
 (0)