From: Benjamin Kramer Date: Thu, 28 Mar 2019 17:18:42 +0000 (+0000) Subject: Make helper functions static. NFC. X-Git-Tag: llvmorg-10-init~8969 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba2ea93ad189d8a1e87e0e02b20790272b7ed375;p=platform%2Fupstream%2Fllvm.git Make helper functions static. NFC. llvm-svn: 357187 --- diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 8418512..540cc6f 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -914,9 +914,10 @@ static PassBuilder::OptimizationLevel mapToLevel(const CodeGenOptions &Opts) { } } -void addSanitizersAtO0(ModulePassManager &MPM, const Triple &TargetTriple, - const LangOptions &LangOpts, - const CodeGenOptions &CodeGenOpts) { +static void addSanitizersAtO0(ModulePassManager &MPM, + const Triple &TargetTriple, + const LangOptions &LangOpts, + const CodeGenOptions &CodeGenOpts) { if (LangOpts.Sanitize.has(SanitizerKind::Address)) { MPM.addPass(RequireAnalysisPass()); bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address); diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 150b21a..b4c8a64 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -13352,10 +13352,11 @@ static bool checkMapConflicts( // Look up the user-defined mapper given the mapper name and mapped type, and // build a reference to it. -ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S, - CXXScopeSpec &MapperIdScopeSpec, - const DeclarationNameInfo &MapperId, - QualType Type, Expr *UnresolvedMapper) { +static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S, + CXXScopeSpec &MapperIdScopeSpec, + const DeclarationNameInfo &MapperId, + QualType Type, + Expr *UnresolvedMapper) { if (MapperIdScopeSpec.isInvalid()) return ExprError(); // Find all user-defined mappers with the given MapperId. diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 8f22e3d..c86ae43 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -161,8 +161,8 @@ const Expr *bugreporter::getDerefExpr(const Stmt *S) { /// are the immediate snapshots of the tracked region's bindings within the /// node's respective states but not really checking that these snapshots /// actually contain the same set of bindings. -bool hasVisibleUpdate(const ExplodedNode *LeftNode, SVal LeftVal, - const ExplodedNode *RightNode, SVal RightVal) { +static bool hasVisibleUpdate(const ExplodedNode *LeftNode, SVal LeftVal, + const ExplodedNode *RightNode, SVal RightVal) { if (LeftVal == RightVal) return true; diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp index 5d7ed8c..4fe455a 100644 --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -132,7 +132,8 @@ static void reportTypeError(const Symbol *Existing, const InputFile *File, // Check the type of new symbol matches that of the symbol is replacing. // Returns true if the function types match, false is there is a singature // mismatch. -bool signatureMatches(FunctionSymbol *Existing, const WasmSignature *NewSig) { +static bool signatureMatches(FunctionSymbol *Existing, + const WasmSignature *NewSig) { if (!NewSig) return true; diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index c59743c..1451766 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -6080,8 +6080,8 @@ void LoopVectorizationCostModel::collectValuesToIgnore() { // `buildVPlans(VF, VF)`. We cannot do it because VPLAN at the moment // doesn't have a cost model that can choose which plan to execute if // more than one is generated. -unsigned determineVPlanVF(const unsigned WidestVectorRegBits, - LoopVectorizationCostModel &CM) { +static unsigned determineVPlanVF(const unsigned WidestVectorRegBits, + LoopVectorizationCostModel &CM) { unsigned WidestType; std::tie(std::ignore, WidestType) = CM.getSmallestAndWidestTypes(); return WidestVectorRegBits / WidestType;