From 12d6be0aa0c2da10be7d588c40bf10a629fb6d8c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 1 May 2015 13:59:53 +0000 Subject: [PATCH] Make helper functions static. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236315 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGOpenMPRuntime.cpp | 9 ++++----- lib/CodeGen/CGStmtOpenMP.cpp | 9 +++++---- lib/Sema/SemaStmt.cpp | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp index 1dbf0e5568..b89f0c0676 100644 --- a/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1740,11 +1740,10 @@ emitProxyTaskFunction(CodeGenModule &CGM, SourceLocation Loc, return TaskEntry; } -llvm::Value *emitDestructorsFunction(CodeGenModule &CGM, SourceLocation Loc, - QualType KmpInt32Ty, - QualType KmpTaskTPtrQTy, - QualType KmpTaskQTy, - RecordDecl *KmpTaskQTyRD) { +static llvm::Value * +emitDestructorsFunction(CodeGenModule &CGM, SourceLocation Loc, + QualType KmpInt32Ty, QualType KmpTaskTPtrQTy, + QualType KmpTaskQTy, RecordDecl *KmpTaskQTyRD) { auto &C = CGM.getContext(); FunctionArgList Args; ImplicitParamDecl GtidArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, KmpInt32Ty); diff --git a/lib/CodeGen/CGStmtOpenMP.cpp b/lib/CodeGen/CGStmtOpenMP.cpp index 1489685459..2c2d7032e3 100644 --- a/lib/CodeGen/CGStmtOpenMP.cpp +++ b/lib/CodeGen/CGStmtOpenMP.cpp @@ -1529,10 +1529,11 @@ static void EmitOMPAtomicWriteExpr(CodeGenFunction &CGF, bool IsSeqCst, CGF.CGM.getOpenMPRuntime().emitFlush(CGF, llvm::None, Loc); } -std::pair emitOMPAtomicRMW(CodeGenFunction &CGF, LValue X, - RValue Update, BinaryOperatorKind BO, - llvm::AtomicOrdering AO, - bool IsXLHSInRHSPart) { +static std::pair emitOMPAtomicRMW(CodeGenFunction &CGF, LValue X, + RValue Update, + BinaryOperatorKind BO, + llvm::AtomicOrdering AO, + bool IsXLHSInRHSPart) { auto &Context = CGF.CGM.getContext(); // Allow atomicrmw only if 'x' and 'update' are integer values, lvalue for 'x' // expression is simple and atomic is allowed for the given type for the diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index ed5da43f8a..0c0c60f1e4 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -3410,6 +3410,7 @@ Sema::ActOnObjCAutoreleasePoolStmt(SourceLocation AtLoc, Stmt *Body) { return new (Context) ObjCAutoreleasePoolStmt(AtLoc, Body); } +namespace { class CatchHandlerType { QualType QT; unsigned IsPointer : 1; @@ -3451,6 +3452,7 @@ public: return LHS.QT == RHS.QT; } }; +} // namespace namespace llvm { template <> struct DenseMapInfo { -- 2.40.0