[PATCH] D81905: Enhance Itanium demangler interface.

Konstantin Bobrovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 20:55:41 PDT 2020


kbobrovs created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
kbobrovs added a reviewer: rsmith.
kbobrovs added a reviewer: erik.pilkington.
Herald added a subscriber: dexonsmith.

Add new APIs needed to use the demangler for C++ demangling in IR passes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81905

Files:
  llvm/include/llvm/Demangle/ItaniumDemangle.h


Index: llvm/include/llvm/Demangle/ItaniumDemangle.h
===================================================================
--- llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -2057,6 +2057,9 @@
     else
       S << Integer;
   }
+
+  // Retrieves the string view of the integer value this node represents.
+  const StringView &getIntegerValue() const { return Integer; }
 };
 
 class IntegerLiteral : public Node {
@@ -2085,6 +2088,13 @@
     if (Type.size() <= 3)
       S += Type;
   }
+
+  // Retrieves the string view of the integer value represented by this node.
+  const StringView &getValue() const { return Value; }
+
+  // Retrieves the string view of the type string of the integer value this node
+  // represents.
+  const StringView &getType() const { return Type; }
 };
 
 template <class Float> struct FloatData;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81905.270950.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200616/dddf8bb6/attachment.bin>


More information about the llvm-commits mailing list