[llvm] r212460 - Make helper functions static.

Benjamin Kramer benny.kra at googlemail.com
Mon Jul 7 07:47:52 PDT 2014


Author: d0k
Date: Mon Jul  7 09:47:51 2014
New Revision: 212460

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

Modified:
    llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=212460&r1=212459&r2=212460&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Mon Jul  7 09:47:51 2014
@@ -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!");
 

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp?rev=212460&r1=212459&r2=212460&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp Mon Jul  7 09:47:51 2014
@@ -961,8 +961,8 @@ bool InstCombiner::WillNotOverflowUnsign
 //   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

Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=212460&r1=212459&r2=212460&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Mon Jul  7 09:47:51 2014
@@ -411,8 +411,8 @@ static Value *getIdentityValue(Instructi
 
 /// 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;
 





More information about the llvm-commits mailing list