[PATCH] D148361: Allow using getters for metadata fields of BBAddrMap::BBEntry.
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 11:58:20 PDT 2023
rahmanl created this revision.
rahmanl added a reviewer: dhoekwater.
Herald added a reviewer: jhenderson.
Herald added a project: All.
rahmanl requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
This is a prequel for D148360 <https://reviews.llvm.org/D148360>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148361
Files:
llvm/include/llvm/Object/ELFTypes.h
llvm/tools/llvm-readobj/ELFDumper.cpp
Index: llvm/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -7337,10 +7337,10 @@
W.printNumber("ID", BBE.ID);
W.printHex("Offset", BBE.Offset);
W.printHex("Size", BBE.Size);
- W.printBoolean("HasReturn", BBE.HasReturn);
- W.printBoolean("HasTailCall", BBE.HasTailCall);
- W.printBoolean("IsEHPad", BBE.IsEHPad);
- W.printBoolean("CanFallThrough", BBE.CanFallThrough);
+ W.printBoolean("HasReturn", BBE.hasReturn());
+ W.printBoolean("HasTailCall", BBE.hasTailCall());
+ W.printBoolean("IsEHPad", BBE.isEHPad());
+ W.printBoolean("CanFallThrough", BBE.canFallThrough());
}
}
}
Index: llvm/include/llvm/Object/ELFTypes.h
===================================================================
--- llvm/include/llvm/Object/ELFTypes.h
+++ llvm/include/llvm/Object/ELFTypes.h
@@ -820,6 +820,11 @@
HasReturn == Other.HasReturn && HasTailCall == Other.HasTailCall &&
IsEHPad == Other.IsEHPad && CanFallThrough == Other.CanFallThrough;
}
+
+ bool hasReturn() const { return HasReturn; }
+ bool hasTailCall() const { return HasTailCall; }
+ bool isEHPad() const { return IsEHPad; }
+ bool canFallThrough() const { return CanFallThrough; }
};
std::vector<BBEntry> BBEntries; // Basic block entries for this function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148361.513702.patch
Type: text/x-patch
Size: 1494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/0aea48a9/attachment.bin>
More information about the llvm-commits
mailing list