Skip to content

Commit db74d92

Browse files
authored
Enhance Itanium demangler interface. (#1880)
Add new APIs needed to use the demangler for C++ demangling in IR passes. Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent bae0639 commit db74d92

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,6 +2057,9 @@ class EnumLiteral : public Node {
20572057
else
20582058
S << Integer;
20592059
}
2060+
2061+
// Retrieves the string view of the integer value this node represents.
2062+
const StringView &getIntegerValue() const { return Integer; }
20602063
};
20612064

20622065
class IntegerLiteral : public Node {
@@ -2085,6 +2088,13 @@ class IntegerLiteral : public Node {
20852088
if (Type.size() <= 3)
20862089
S += Type;
20872090
}
2091+
2092+
// Retrieves the string view of the integer value represented by this node.
2093+
const StringView &getValue() const { return Value; }
2094+
2095+
// Retrieves the string view of the type string of the integer value this node
2096+
// represents.
2097+
const StringView &getType() const { return Type; }
20882098
};
20892099

20902100
template <class Float> struct FloatData;

0 commit comments

Comments
 (0)