Author: gulfemsavrun
Date: 2024-05-28T15:06:11-07:00
New Revision: 765206e050453018e861637a08a4520f29238074

URL: 
https://github.com/llvm/llvm-project/commit/765206e050453018e861637a08a4520f29238074
DIFF: 
https://github.com/llvm/llvm-project/commit/765206e050453018e861637a08a4520f29238074.diff

LOG: [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.

Added: 
    

Modified: 
    clang/lib/CodeGen/CodeGenPGO.cpp

Removed: 
    


################################################################################
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);


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to