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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212460 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 42a0e9290bf7949006a7d471c91e2a87ba74dc8f..03f4a51e8b63f342248edbaf76368e86fa478e29 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 c18ed2df7adc9bc0dc8be2f76c867e067dcdd0a4..99f0f1f08d7a368ecf9c83af20c4600c161e9683 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 88d461e1b238060bd91254c7016ef31d88b03bbd..6cba8e37509bc925226f7c9bf2af1d56afa616cc 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;