[PATCH] D148361: Allow using getters for metadata fields of BBAddrMap::BBEntry.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 14:16:42 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG52f934f3697c: Allow using getters for metadata fields of BBAddrMap::BBEntry. (authored by rahmanl).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148361/new/

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
@@ -7446,10 +7446,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.514400.patch
Type: text/x-patch
Size: 1494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/e6ddb69e/attachment.bin>


More information about the llvm-commits mailing list