[clang] [CodeGen] Hidden visibility for prof version var (PR #93496)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 27 18:46:30 PDT 2024
https://github.com/gulfemsavrun created https://github.com/llvm/llvm-project/pull/93496
This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.
>From 1e0625be05a30118eeadd1d65df675da4cddc313 Mon Sep 17 00:00:00 2001
From: Gulfem Savrun Yeniceri <gulfem at google.com>
Date: Tue, 28 May 2024 00:04:25 +0000
Subject: [PATCH] [CodeGen] Hidden visibility for prof version var
This patch adds hidden visibility to the variable
that is used by the single byte counters mode in
source-based code coverage.
---
clang/lib/CodeGen/CodeGenPGO.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the cfe-commits
mailing list