[llvm] r207359 - Make helper functions static.

Benjamin Kramer benny.kra at googlemail.com
Sun Apr 27 07:54:59 PDT 2014


Author: d0k
Date: Sun Apr 27 09:54:59 2014
New Revision: 207359

URL: http://llvm.org/viewvc/llvm-project?rev=207359&view=rev
Log:
Make helper functions static.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
    llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp?rev=207359&r1=207358&r2=207359&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp Sun Apr 27 09:54:59 2014
@@ -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) {

Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=207359&r1=207358&r2=207359&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Sun Apr 27 09:54:59 2014
@@ -634,7 +634,7 @@ static bool OptimizeCmpExpression(CmpIns
 /// 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(Instructi
 
 /// 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) {





More information about the llvm-commits mailing list