[clang] [clang][bytecode][NFC] Remove PT_FnPtr (PR #135947)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 26 11:53:03 PDT 2025
================
@@ -16,27 +16,22 @@ APValue FunctionPointer::toAPValue(const ASTContext &) const {
return APValue(static_cast<Expr *>(nullptr), CharUnits::Zero(), {},
/*OnePastTheEnd=*/false, /*IsNull=*/true);
- if (!Valid)
- return APValue(static_cast<Expr *>(nullptr),
- CharUnits::fromQuantity(getIntegerRepresentation()), {},
- /*OnePastTheEnd=*/false, /*IsNull=*/false);
-
if (Func->getDecl())
- return APValue(Func->getDecl(), CharUnits::fromQuantity(Offset), {},
+ return APValue(Func->getDecl(), CharUnits::fromQuantity(0), {},
/*OnePastTheEnd=*/false, /*IsNull=*/false);
- return APValue(Func->getExpr(), CharUnits::fromQuantity(Offset), {},
+ return APValue(Func->getExpr(), CharUnits::fromQuantity(0), {},
/*OnePastTheEnd=*/false, /*IsNull=*/false);
}
void FunctionPointer::print(llvm::raw_ostream &OS) const {
OS << "FnPtr(";
- if (Func && Valid)
+ if (Func)
OS << Func->getName();
else if (Func)
----------------
shafik wrote:
ping @tbaederr
https://github.com/llvm/llvm-project/pull/135947
More information about the cfe-commits
mailing list