Make helper functions static.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 27 Apr 2014 14:54:59 +0000 (14:54 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 27 Apr 2014 14:54:59 +0000 (14:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207359 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
lib/CodeGen/CodeGenPrepare.cpp

index 84c9a88d9cd9729e3df1d06c3732e235d14f82b9..72cab60e2321c0a14c068fea4bcd4e9e0639c42f 100644 (file)
@@ -14,7 +14,7 @@ using namespace llvm;
 
 MCSymbol *DwarfStringPool::getSectionSymbol() { return SectionSymbol; }
 
-std::pair<MCSymbol *, unsigned> &
+static std::pair<MCSymbol *, unsigned> &
 getEntry(AsmPrinter &Asm,
          StringMap<std::pair<MCSymbol *, unsigned>, BumpPtrAllocator &> &Pool,
          StringRef Prefix, StringRef Str) {
index ff2459df87ef8a4058836e557f0d7e99d3709ca2..d2559cf53d2306adb4d42937f6f2ae09dae42d36 100644 (file)
@@ -634,7 +634,7 @@ static bool OptimizeCmpExpression(CmpInst *CI) {
 /// 1. Truncate instruction
 /// 2. And instruction and the imm is a mask of the low bits:
 /// imm & (imm+1) == 0
-bool isExtractBitsCandidateUse(Instruction *User) {
+static bool isExtractBitsCandidateUse(Instruction *User) {
   if (!isa<TruncInst>(User)) {
     if (User->getOpcode() != Instruction::And ||
         !isa<ConstantInt>(User->getOperand(1)))
@@ -650,7 +650,7 @@ bool isExtractBitsCandidateUse(Instruction *User) {
 
 /// SinkShiftAndTruncate - sink both shift and truncate instruction
 /// to the use of truncate's BB.
-bool
+static bool
 SinkShiftAndTruncate(BinaryOperator *ShiftI, Instruction *User, ConstantInt *CI,
                      DenseMap<BasicBlock *, BinaryOperator *> &InsertedShifts,
                      const TargetLowering &TLI) {