[PATCH] D81905: Enhance Itanium demangler interface.
Konstantin Bobrovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 15:50:43 PDT 2020
kbobrovs added a comment.
> Thanks. Regarding this patch itself, did you explain how this API is to be used?
Not specifically. I just mentioned it will be used in LLVM passes which use the demangler.
Example for IntegerLiteral::getType() and getValue():
switch (Args[N]->getKind()) {
case id::Node::KIntegerLiteral: {
auto *ValL = castNode(Args[N], IntegerLiteral);
const id::StringView &TyStr = ValL->getType();
Ty = TyStr.size() == 0 ? IntegerType::getInt32Ty(Ctx)
: parsePrimitiveTypeString(
StringRef(TyStr.begin(), TyStr.size()), Ctx);
Val = ValL->getValue();
break;
}
...
return APInt(Ty->getPrimitiveSizeInBits(), StringRef(Val.begin(), Val.size()),
10);
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81905/new/
https://reviews.llvm.org/D81905
More information about the llvm-commits
mailing list