Make helper functions static.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 7 Jul 2014 14:47:51 +0000 (14:47 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 7 Jul 2014 14:47:51 +0000 (14:47 +0000)
llvm-svn: 212460

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

index 42a0e92..03f4a51 100644 (file)
@@ -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!");
 
index c18ed2d..99f0f1f 100644 (file)
@@ -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
index 88d461e..6cba8e3 100644 (file)
@@ -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;