Skip to content

Commit 765206e

Browse files
authored
[CodeGen] Hidden visibility for prof version var (#93496)
This patch adds hidden visibility to the variable that is used by the single byte counters mode in source-based code coverage.
1 parent 2d00c6f commit 765206e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CodeGenPGO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ void CodeGenPGO::setProfileVersion(llvm::Module &M) {
13401340
llvm::APInt(64, ProfileVersion)),
13411341
VarName);
13421342

1343-
IRLevelVersionVariable->setVisibility(llvm::GlobalValue::DefaultVisibility);
1343+
IRLevelVersionVariable->setVisibility(llvm::GlobalValue::HiddenVisibility);
13441344
llvm::Triple TT(M.getTargetTriple());
13451345
if (TT.supportsCOMDAT()) {
13461346
IRLevelVersionVariable->setLinkage(llvm::GlobalValue::ExternalLinkage);

0 commit comments

Comments
 (0)