[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
This commit is contained in:
@@ -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 !=
|
||||
|
||||
Reference in New Issue
Block a user