[PATCH] D128842: [InstrProf] Mark __llvm_profile_runtime hidden to match libclang_rt.profile definition

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 16:03:01 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

> This change does not mark the symbol hidden on Windows to match libclang_rt.profile's default visibility for Windows targets.

Just drop the special case.

This change looks good to me because of `COMPILER_RT_VISIBILITY extern int INSTR_PROF_PROFILE_RUNTIME_VAR; `



================
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:1247
                          nullptr, getInstrProfRuntimeHookVarName());
+  if (!TT.isOSWindows())
+    Var->setVisibility(GlobalValue::HiddenVisibility);
----------------
Remove Windows special case. The visibility is a no-op on Windows.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128842/new/

https://reviews.llvm.org/D128842



More information about the llvm-commits mailing list