================
@@ -1272,6 +1272,21 @@ void CodeGenFunction::EmitBoundsCheckImpl(const Expr *E,
llvm::Value *Bound,
EmitCheck(std::make_pair(Check, CheckKind), CheckHandler, StaticData, Index);
}
+void CodeGenFunction::EmitAllocToken(llvm::CallBase *CB, QualType AllocType) {
+ assert(SanOpts.has(SanitizerKind::AllocToken) &&
+ "Only needed with -fsanitize=alloc-token");
+
+ PrintingPolicy Policy(CGM.getContext().getLangOpts());
+ Policy.SuppressTagKeyword = true;
+ Policy.FullyQualifiedName = true;
+ std::string TypeName = AllocType.getCanonicalType().getAsString(Policy);
----------------
zmodem wrote:
Use a SmallString (with something like 256 bytes of buffer) to avoid heap
allocation for typical cases?
https://github.com/llvm/llvm-project/pull/156839
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits