From 2e427d4dbd4ca8cae143b4096d0f64eb503a555c Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 25 Feb 2015 22:52:20 +0000 Subject: InstrProf: Make the __llvm_profile_runtime_user symbol hidden This symbol exists only to pull in the required pieces of the runtime, so nothing ever needs to refer to it. Making it hidden avoids the potential for issues with duplicate symbols when linking profiled libraries together. llvm-svn: 230566 --- llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp') diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp index 2a3d15421de..b5a491f3a40 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -288,6 +288,7 @@ void InstrProfiling::emitRuntimeHook() { User->addFnAttr(Attribute::NoInline); if (Options.NoRedZone) User->addFnAttr(Attribute::NoRedZone); + User->setVisibility(GlobalValue::HiddenVisibility); IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", User)); auto *Load = IRB.CreateLoad(Var); -- cgit v1.2.3