diff options
| author | Congcong Cai <congcongcai0907@163.com> | 2024-09-24 07:25:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-24 07:25:07 +0800 |
| commit | eca5949031c31fe5ff5ad7a5df07bbce13379108 (patch) | |
| tree | 87037d8f85713a8a0b6f88609b6264410ff388e6 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | eddbd4eb081fedddd4028244418f89e4bf5ffb09 (diff) | |
[codegen][NFC] add static mark for internal usage variable and function (#109431)
Detect by clang-tidy misc-use-internal-linkage
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 17b82b205063..d53d47979f29 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -784,8 +784,9 @@ getLLVMVisibility(clang::LangOptions::VisibilityFromDLLStorageClassKinds K) { llvm_unreachable("unknown option value!"); } -void setLLVMVisibility(llvm::GlobalValue &GV, - std::optional<llvm::GlobalValue::VisibilityTypes> V) { +static void +setLLVMVisibility(llvm::GlobalValue &GV, + std::optional<llvm::GlobalValue::VisibilityTypes> V) { if (!V) return; @@ -4224,8 +4225,8 @@ TargetMVPriority(const TargetInfo &TI, // in the cases of CPUDispatch, this causes issues. This also makes sure we // work with internal linkage functions, so that the same function name can be // used with internal linkage in multiple TUs. -llvm::GlobalValue::LinkageTypes getMultiversionLinkage(CodeGenModule &CGM, - GlobalDecl GD) { +static llvm::GlobalValue::LinkageTypes +getMultiversionLinkage(CodeGenModule &CGM, GlobalDecl GD) { const FunctionDecl *FD = cast<FunctionDecl>(GD.getDecl()); if (FD->getFormalLinkage() == Linkage::Internal) return llvm::GlobalValue::InternalLinkage; |
