[clang] [Clang] Cast UBSan globals to appropriate generic address space (PR #219023)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 27 00:14:09 PDT 2026
================
@@ -4307,8 +4307,8 @@ void CodeGenFunction::EmitCheck(
CGM.getDataLayout().getDefaultGlobalsAddressSpace());
InfoPtr->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
CGM.getSanitizerMetadata()->disableSanitizerForGlobal(InfoPtr);
- Args.push_back(InfoPtr);
- ArgTypes.push_back(Args.back()->getType());
+ Args.push_back(Builder.CreateAddrSpaceCast(InfoPtr, CGM.VoidPtrTy));
----------------
arsenm wrote:
Is there a way to query the type from the signature? In principle we could have specific address space runtime functions
https://github.com/llvm/llvm-project/pull/219023
More information about the cfe-commits
mailing list