summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2023-02-14 10:37:46 -0500
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2023-02-14 11:52:41 -0500
commitf4d8b8781de9b0efbaf79621ff66c16964bb1df2 (patch)
treefd36498b426725d06ab27936d97cd3c313dd9163 /clang/lib/CodeGen/CodeGenModule.cpp
parentc5085c91cc8eb542933fcf11b684127cbc64d63e (diff)
[AMDGPU ASAN] Remove reference to asan bitcode library
The asan functions are now attributed as used in the device library, no need to keep the declaration of asan device preserve function. Patch by: Praveen Velliengiri Reviewed by: Yaxun Liu Differential Revision: https://reviews.llvm.org/D143495
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 71a2f61ea955..90c9df4ea442 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -580,20 +580,6 @@ void CodeGenModule::Release() {
EmitMainVoidAlias();
if (getTriple().isAMDGPU()) {
- // Emit reference of __amdgpu_device_library_preserve_asan_functions to
- // preserve ASAN functions in bitcode libraries.
- if (LangOpts.Sanitize.has(SanitizerKind::Address)) {
- auto *FT = llvm::FunctionType::get(VoidTy, {});
- auto *F = llvm::Function::Create(
- FT, llvm::GlobalValue::ExternalLinkage,
- "__amdgpu_device_library_preserve_asan_functions", &getModule());
- auto *Var = new llvm::GlobalVariable(
- getModule(), FT->getPointerTo(),
- /*isConstant=*/true, llvm::GlobalValue::WeakAnyLinkage, F,
- "__amdgpu_device_library_preserve_asan_functions_ptr", nullptr,
- llvm::GlobalVariable::NotThreadLocal);
- addCompilerUsedGlobal(Var);
- }
// Emit amdgpu_code_object_version module flag, which is code object version
// times 100.
if (getTarget().getTargetOpts().CodeObjectVersion !=