Skip to content

Commit

Permalink
[CodeGen] Hidden visibility for prof version var (#93496)
Browse files Browse the repository at this point in the history
This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.
  • Loading branch information
gulfemsavrun authored May 28, 2024
1 parent 2d00c6f commit 765206e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CodeGenPGO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ void CodeGenPGO::setProfileVersion(llvm::Module &M) {
llvm::APInt(64, ProfileVersion)),
VarName);

IRLevelVersionVariable->setVisibility(llvm::GlobalValue::DefaultVisibility);
IRLevelVersionVariable->setVisibility(llvm::GlobalValue::HiddenVisibility);
llvm::Triple TT(M.getTargetTriple());
if (TT.supportsCOMDAT()) {
IRLevelVersionVariable->setLinkage(llvm::GlobalValue::ExternalLinkage);
Expand Down

0 comments on commit 765206e

Please sign in to comment.