[llvm-branch-commits] [llvm] a4cadc2 - [TargetMachine] Don't imply dso_local for memprof in static relocation model
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Dec 5 21:44:17 PST 2020
Author: Fangrui Song
Date: 2020-12-05T21:39:03-08:00
New Revision: a4cadc2df92bb1b6c5d6c0d20ebadbc0fa74189b
URL: https://github.com/llvm/llvm-project/commit/a4cadc2df92bb1b6c5d6c0d20ebadbc0fa74189b
DIFF: https://github.com/llvm/llvm-project/commit/a4cadc2df92bb1b6c5d6c0d20ebadbc0fa74189b.diff
LOG: [TargetMachine] Don't imply dso_local for memprof in static relocation model
The workaround is no longer needed with my previous commit to MemProfiler.cpp
Added:
Modified:
llvm/lib/Target/TargetMachine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index d9c894537b72..07a6e53c8f0f 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -166,8 +166,7 @@ bool TargetMachine::shouldAssumeDSOLocal(const Module &M,
// FIXME Sanitizers do not call setDSOLocal appropriately. Fix sanitizers
// and delete the hack.
if (RM == Reloc::Static && !GV->isThreadLocal() &&
- (M.getFunction("asan.module_ctor") ||
- M.getFunction("memprof.module_ctor")))
+ M.getFunction("asan.module_ctor"))
return true;
} else if (TT.isOSBinFormatELF()) {
// If dso_local allows AsmPrinter::getSymbolPreferLocal to use a local
More information about the llvm-branch-commits
mailing list