Make helper functions static.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 13 Jul 2012 13:25:15 +0000 (13:25 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 13 Jul 2012 13:25:15 +0000 (13:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160173 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.cpp
lib/Transforms/Utils/SimplifyCFG.cpp

index 921d2150f62b648429b7e46dffbfd75bc821dd51..53d5ee302245ffc974f8fcdd0e54e01349e37972 100644 (file)
@@ -2376,7 +2376,7 @@ X86::CondCode X86::GetOppositeBranchCondition(X86::CondCode CC) {
 /// getSwappedCondition - assume the flags are set by MI(a,b), return
 /// the condition code if we modify the instructions such that flags are
 /// set by MI(b,a).
-X86::CondCode getSwappedCondition(X86::CondCode CC) {
+static X86::CondCode getSwappedCondition(X86::CondCode CC) {
   switch (CC) {
   default: return X86::COND_INVALID;
   case X86::COND_E:  return X86::COND_E;
index f37ea91397ba4340504165d79b033146eb08fcc4..70c0f244f682952ebc669ea137fde1e08b89d38b 100644 (file)
@@ -1550,7 +1550,7 @@ static APInt MultiplyAndLosePrecision(APInt &A, APInt &B, APInt &C, APInt &D,
 /// checkCSEInPredecessor - Return true if the given instruction is available
 /// in its predecessor block. If yes, the instruction will be removed.
 ///
-bool checkCSEInPredecessor(Instruction *Inst, BasicBlock *PB) {
+static bool checkCSEInPredecessor(Instruction *Inst, BasicBlock *PB) {
   if (!isa<BinaryOperator>(Inst) && !isa<CmpInst>(Inst))
     return false;
   for (BasicBlock::iterator I = PB->begin(), E = PB->end(); I != E; I++) {