diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2020-01-14 14:06:12 +0100 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2020-01-14 14:06:37 +0100 |
| commit | df186507e1d07c3ddba091a076ba7a33dbdc5867 (patch) | |
| tree | 1a036220e7fe46703e2bc0840172068ddeffadc7 /clang/lib/CodeGen | |
| parent | bff33bd5c83b947cccb4d6cf6ebca9dc021f716b (diff) | |
| download | bcm5719-llvm-df186507e1d07c3ddba091a076ba7a33dbdc5867.tar.gz bcm5719-llvm-df186507e1d07c3ddba091a076ba7a33dbdc5867.zip | |
Make helper functions static or move them into anonymous namespaces. NFC.
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 7b2b0336c32..09fd3087b49 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -14260,6 +14260,7 @@ CodeGenFunction::EmitNVPTXBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { } } +namespace { struct BuiltinAlignArgs { llvm::Value *Src = nullptr; llvm::Type *SrcType = nullptr; @@ -14288,6 +14289,7 @@ struct BuiltinAlignArgs { Mask = CGF.Builder.CreateSub(Alignment, One, "mask"); } }; +} // namespace /// Generate (x & (y-1)) == 0. RValue CodeGenFunction::EmitBuiltinIsAligned(const CallExpr *E) { diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 0d96c5a2f73..97b17799a03 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1438,6 +1438,7 @@ CGOpenMPRuntime::getUserDefinedReduction(const OMPDeclareReductionDecl *D) { return UDRMap.lookup(D); } +namespace { // Temporary RAII solution to perform a push/pop stack event on the OpenMP IR // Builder if one is present. struct PushAndPopStackRAII { @@ -1481,6 +1482,7 @@ struct PushAndPopStackRAII { } llvm::OpenMPIRBuilder *OMPBuilder; }; +} // namespace static llvm::Function *emitParallelOrTeamsOutlinedFunction( CodeGenModule &CGM, const OMPExecutableDirective &D, const CapturedStmt *CS, @@ -11122,8 +11124,8 @@ bool checkContext<OMP_CTX_SET_device, OMP_CTX_kind, CodeGenModule &>( return true; } -bool matchesContext(CodeGenModule &CGM, - const CompleteOMPContextSelectorData &ContextData) { +static bool matchesContext(CodeGenModule &CGM, + const CompleteOMPContextSelectorData &ContextData) { for (const OMPContextSelectorData &Data : ContextData) { switch (Data.Ctx) { case OMP_CTX_vendor: |

