Skip to content

[CodeGen] Hidden visibility for prof version var #93496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2024

Conversation

gulfemsavrun
Copy link
Contributor

This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.

This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:codegen IR generation bugs: mangling, exceptions, etc. labels May 28, 2024
@llvmbot
Copy link
Member

llvmbot commented May 28, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-codegen

Author: None (gulfemsavrun)

Changes

This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.


Full diff: https://github.com/llvm/llvm-project/pull/93496.diff

1 Files Affected:

  • (modified) clang/lib/CodeGen/CodeGenPGO.cpp (+1-1)
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 76704c4d7be4a..db8e6f55302ad 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -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);

@gulfemsavrun gulfemsavrun requested a review from petrhosek May 28, 2024 01:47
@gulfemsavrun gulfemsavrun merged commit 765206e into llvm:main May 28, 2024
11 checks passed
vg0204 pushed a commit to vg0204/llvm-project that referenced this pull request May 29, 2024
This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:codegen IR generation bugs: mangling, exceptions, etc. clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants