From 0e278ad08b1885ae522583baa1f08a87c423ad93 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 7 Jul 2014 14:47:51 +0000 Subject: [PATCH] Make helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212460 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 +- lib/Transforms/InstCombine/InstCombineAddSub.cpp | 4 ++-- lib/Transforms/InstCombine/InstructionCombining.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 42a0e9290bf..03f4a51e8b6 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -760,7 +760,7 @@ getCOFFSectionFlags(SectionKind K) { return Flags; } -const GlobalValue *getComdatGVForCOFF(const GlobalValue *GV) { +static const GlobalValue *getComdatGVForCOFF(const GlobalValue *GV) { const Comdat *C = GV->getComdat(); assert(C && "expected GV to have a Comdat!"); diff --git a/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/lib/Transforms/InstCombine/InstCombineAddSub.cpp index c18ed2df7ad..99f0f1f08d7 100644 --- a/lib/Transforms/InstCombine/InstCombineAddSub.cpp +++ b/lib/Transforms/InstCombine/InstCombineAddSub.cpp @@ -961,8 +961,8 @@ bool InstCombiner::WillNotOverflowUnsignedAdd(Value *LHS, Value *RHS) { // ADD(XOR(OR(Z, NOT(C)), C)), 1) == NEG(AND(Z, C)) // ADD(XOR(AND(Z, C), C), 1) == NEG(OR(Z, ~C)) // XOR(AND(Z, C), (C + 1)) == NEG(OR(Z, ~C)) if C is even -Value *checkForNegativeOperand(BinaryOperator &I, - InstCombiner::BuilderTy *Builder) { +static Value *checkForNegativeOperand(BinaryOperator &I, + InstCombiner::BuilderTy *Builder) { Value *LHS = I.getOperand(0), *RHS = I.getOperand(1); // This function creates 2 instructions to replace ADD, we need at least one diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 88d461e1b23..6cba8e37509 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -411,8 +411,8 @@ static Value *getIdentityValue(Instruction::BinaryOps OpCode, Value *V) { /// This function factors binary ops which can be combined using distributive /// laws. This also factor SHL as MUL e.g. SHL(X, 2) ==> MUL(X, 4). -Instruction::BinaryOps getBinOpsForFactorization(BinaryOperator *Op, - Value *&LHS, Value *&RHS) { +static Instruction::BinaryOps +getBinOpsForFactorization(BinaryOperator *Op, Value *&LHS, Value *&RHS) { if (!Op) return Instruction::BinaryOpsEnd;