[clang] [CIR] Implement setGlobalVisibility (PR #195257)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 04:34:16 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/lib/CIR/CodeGen/CIRGenModule.cpp clang/lib/CIR/CodeGen/CIRGenModule.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.h b/clang/lib/CIR/CodeGen/CIRGenModule.h
index f388e84ad..66c222b2a 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.h
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.h
@@ -440,7 +440,7 @@ public:
case ProtectedVisibility:
return cir::VisibilityKind::Protected;
}
-
+
llvm_unreachable("unknown visibility!");
}
@@ -612,7 +612,8 @@ public:
mlir::Type convertType(clang::QualType type);
/// Set the visibility for the given global.
- void setGlobalVisibility(cir::CIRGlobalValueInterface gv, const NamedDecl *d) const;
+ void setGlobalVisibility(cir::CIRGlobalValueInterface gv,
+ const NamedDecl *d) const;
void setDSOLocal(mlir::Operation *op) const;
void setDSOLocal(cir::CIRGlobalValueInterface gv) const;
``````````
</details>
https://github.com/llvm/llvm-project/pull/195257
More information about the cfe-commits
mailing list