[llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp ConstantMerge.cpp DeadArgumentElimination.cpp DeadTypeElimination.cpp ExtractFunction.cpp GlobalDCE.cpp GlobalOpt.cpp IPConstantPropagation.cpp IndMemRemoval.cpp InlineSimple.cpp Inliner.cpp Inliner.h Internalize.cpp LoopExtractor.cpp LowerSetJmp.cpp PruneEH.cpp RaiseAllocations.cpp SimplifyLibCalls.cpp StripDeadPrototypes.cpp StripSymbols.cpp
Devang Patel
dpatel at apple.com
Wed May 2 14:41:34 PDT 2007
Changes in directory llvm/lib/Transforms/IPO:
ArgumentPromotion.cpp updated: 1.40 -> 1.41
ConstantMerge.cpp updated: 1.40 -> 1.41
DeadArgumentElimination.cpp updated: 1.41 -> 1.42
DeadTypeElimination.cpp updated: 1.63 -> 1.64
ExtractFunction.cpp updated: 1.21 -> 1.22
GlobalDCE.cpp updated: 1.46 -> 1.47
GlobalOpt.cpp updated: 1.102 -> 1.103
IPConstantPropagation.cpp updated: 1.24 -> 1.25
IndMemRemoval.cpp updated: 1.16 -> 1.17
InlineSimple.cpp updated: 1.79 -> 1.80
Inliner.cpp updated: 1.38 -> 1.39
Inliner.h updated: 1.10 -> 1.11
Internalize.cpp updated: 1.46 -> 1.47
LoopExtractor.cpp updated: 1.25 -> 1.26
LowerSetJmp.cpp updated: 1.41 -> 1.42
PruneEH.cpp updated: 1.32 -> 1.33
RaiseAllocations.cpp updated: 1.41 -> 1.42
SimplifyLibCalls.cpp updated: 1.113 -> 1.114
StripDeadPrototypes.cpp updated: 1.6 -> 1.7
StripSymbols.cpp updated: 1.16 -> 1.17
---
Log message:
Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
---
Diffs of the changes: (+44 -44)
ArgumentPromotion.cpp | 4 ++--
ConstantMerge.cpp | 4 ++--
DeadArgumentElimination.cpp | 8 ++++----
DeadTypeElimination.cpp | 4 ++--
ExtractFunction.cpp | 4 ++--
GlobalDCE.cpp | 4 ++--
GlobalOpt.cpp | 4 ++--
IPConstantPropagation.cpp | 4 ++--
IndMemRemoval.cpp | 4 ++--
InlineSimple.cpp | 4 ++--
Inliner.cpp | 2 +-
Inliner.h | 2 +-
Internalize.cpp | 4 ++--
LoopExtractor.cpp | 12 ++++++------
LowerSetJmp.cpp | 4 ++--
PruneEH.cpp | 4 ++--
RaiseAllocations.cpp | 4 ++--
SimplifyLibCalls.cpp | 4 ++--
StripDeadPrototypes.cpp | 4 ++--
StripSymbols.cpp | 4 ++--
20 files changed, 44 insertions(+), 44 deletions(-)
Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.40 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.41
--- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.40 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Wed May 2 16:39:19 2007
@@ -63,7 +63,7 @@
}
virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
ArgPromotion() : CallGraphSCCPass((intptr_t)&ID) {}
private:
@@ -72,7 +72,7 @@
Function *DoPromotion(Function *F, std::vector<Argument*> &ArgsToPromote);
};
- const int ArgPromotion::ID = 0;
+ const char ArgPromotion::ID = 0;
RegisterPass<ArgPromotion> X("argpromotion",
"Promote 'by reference' arguments to scalars");
}
Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.40 llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.41
--- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.40 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/ConstantMerge.cpp Wed May 2 16:39:19 2007
@@ -29,7 +29,7 @@
namespace {
struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
ConstantMerge() : ModulePass((intptr_t)&ID) {}
// run - For this pass, process all of the globals in the module,
@@ -38,7 +38,7 @@
bool runOnModule(Module &M);
};
- const int ConstantMerge::ID = 0;
+ const char ConstantMerge::ID = 0;
RegisterPass<ConstantMerge>X("constmerge","Merge Duplicate Global Constants");
}
Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.41 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.42
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.41 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Wed May 2 16:39:19 2007
@@ -76,7 +76,7 @@
std::multimap<Function*, CallSite> CallSites;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
DAE() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M);
@@ -95,17 +95,17 @@
void RemoveDeadArgumentsFromFunction(Function *F);
};
- const int DAE::ID = 0;
+ const char DAE::ID = 0;
RegisterPass<DAE> X("deadargelim", "Dead Argument Elimination");
/// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
/// deletes arguments to functions which are external. This is only for use
/// by bugpoint.
struct DAH : public DAE {
- static const int ID;
+ static const char ID;
virtual bool ShouldHackArguments() const { return true; }
};
- const int DAH::ID = 0;
+ const char DAH::ID = 0;
RegisterPass<DAH> Y("deadarghaX0r",
"Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)");
}
Index: llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.63 llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.64
--- llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.63 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/DeadTypeElimination.cpp Wed May 2 16:39:19 2007
@@ -26,7 +26,7 @@
namespace {
struct VISIBILITY_HIDDEN DTE : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
DTE() : ModulePass((intptr_t)&ID) {}
// doPassInitialization - For this pass, it removes global symbol table
@@ -43,7 +43,7 @@
AU.addRequired<FindUsedTypes>();
}
};
- const int DTE::ID = 0;
+ const char DTE::ID = 0;
RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
}
Index: llvm/lib/Transforms/IPO/ExtractFunction.cpp
diff -u llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.21 llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.22
--- llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.21 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/ExtractFunction.cpp Wed May 2 16:39:19 2007
@@ -25,7 +25,7 @@
bool deleteFunc;
bool reLink;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
/// FunctionExtractorPass - If deleteFn is true, this pass deletes as the
/// specified function. Otherwise, it deletes as much of the module as
@@ -134,7 +134,7 @@
}
};
- const int FunctionExtractorPass::ID = 0;
+ const char FunctionExtractorPass::ID = 0;
RegisterPass<FunctionExtractorPass> X("extract", "Function Extractor");
}
Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp
diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.46 llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.47
--- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.46 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/GlobalDCE.cpp Wed May 2 16:39:19 2007
@@ -30,7 +30,7 @@
namespace {
struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
GlobalDCE() : ModulePass((intptr_t)&ID) {}
// run - Do the GlobalDCE pass on the specified module, optionally updating
@@ -49,7 +49,7 @@
bool SafeToDestroyConstant(Constant* C);
bool RemoveUnusedGlobalValue(GlobalValue &GV);
};
- const int GlobalDCE::ID = 0;
+ const char GlobalDCE::ID = 0;
RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
}
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.102 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.103
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.102 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Wed May 2 16:39:19 2007
@@ -50,7 +50,7 @@
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetData>();
}
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
GlobalOpt() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M);
@@ -63,7 +63,7 @@
bool ProcessInternalGlobal(GlobalVariable *GV,Module::global_iterator &GVI);
};
- const int GlobalOpt::ID = 0;
+ const char GlobalOpt::ID = 0;
RegisterPass<GlobalOpt> X("globalopt", "Global Variable Optimizer");
}
Index: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
diff -u llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.24 llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.25
--- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.24 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/IPConstantPropagation.cpp Wed May 2 16:39:19 2007
@@ -33,7 +33,7 @@
/// IPCP - The interprocedural constant propagation pass
///
struct VISIBILITY_HIDDEN IPCP : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
IPCP() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M);
@@ -41,7 +41,7 @@
bool PropagateConstantsIntoArguments(Function &F);
bool PropagateConstantReturn(Function &F);
};
- const int IPCP::ID = 0;
+ const char IPCP::ID = 0;
RegisterPass<IPCP> X("ipconstprop", "Interprocedural constant propagation");
}
Index: llvm/lib/Transforms/IPO/IndMemRemoval.cpp
diff -u llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.16 llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.17
--- llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.16 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/IndMemRemoval.cpp Wed May 2 16:39:19 2007
@@ -32,12 +32,12 @@
namespace {
class VISIBILITY_HIDDEN IndMemRemPass : public ModulePass {
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
IndMemRemPass() : ModulePass((intptr_t)&ID) {}
virtual bool runOnModule(Module &M);
};
- const int IndMemRemPass::ID = 0;
+ const char IndMemRemPass::ID = 0;
RegisterPass<IndMemRemPass> X("indmemrem","Indirect Malloc and Free Removal");
} // end anonymous namespace
Index: llvm/lib/Transforms/IPO/InlineSimple.cpp
diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.79 llvm/lib/Transforms/IPO/InlineSimple.cpp:1.80
--- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.79 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/InlineSimple.cpp Wed May 2 16:39:19 2007
@@ -54,10 +54,10 @@
class VISIBILITY_HIDDEN SimpleInliner : public Inliner {
std::map<const Function*, FunctionInfo> CachedFunctionInfo;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
int getInlineCost(CallSite CS);
};
- const int SimpleInliner::ID = 0;
+ const char SimpleInliner::ID = 0;
RegisterPass<SimpleInliner> X("inline", "Function Integration/Inlining");
}
Index: llvm/lib/Transforms/IPO/Inliner.cpp
diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.38 llvm/lib/Transforms/IPO/Inliner.cpp:1.39
--- llvm/lib/Transforms/IPO/Inliner.cpp:1.38 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/Inliner.cpp Wed May 2 16:39:19 2007
@@ -36,7 +36,7 @@
cl::desc("Control the amount of inlining to perform (default = 200)"));
}
-const int Inliner::ID = 0;
+const char Inliner::ID = 0;
Inliner::Inliner()
: CallGraphSCCPass((intptr_t)&ID), InlineThreshold(InlineLimit) {}
Index: llvm/lib/Transforms/IPO/Inliner.h
diff -u llvm/lib/Transforms/IPO/Inliner.h:1.10 llvm/lib/Transforms/IPO/Inliner.h:1.11
--- llvm/lib/Transforms/IPO/Inliner.h:1.10 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/Inliner.h Wed May 2 16:39:19 2007
@@ -27,7 +27,7 @@
/// perform the inlining operations that does not depend on the policy.
///
struct Inliner : public CallGraphSCCPass {
- static const int ID;
+ static const char ID;
Inliner();
/// getAnalysisUsage - For this class, we declare that we require and preserve
Index: llvm/lib/Transforms/IPO/Internalize.cpp
diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.46 llvm/lib/Transforms/IPO/Internalize.cpp:1.47
--- llvm/lib/Transforms/IPO/Internalize.cpp:1.46 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/Internalize.cpp Wed May 2 16:39:19 2007
@@ -46,13 +46,13 @@
std::set<std::string> ExternalNames;
bool DontInternalize;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
InternalizePass(bool InternalizeEverything = true);
InternalizePass(const std::vector <const char *>& exportList);
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
};
- const int InternalizePass::ID = 0;
+ const char InternalizePass::ID = 0;
RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols");
} // end anonymous namespace
Index: llvm/lib/Transforms/IPO/LoopExtractor.cpp
diff -u llvm/lib/Transforms/IPO/LoopExtractor.cpp:1.25 llvm/lib/Transforms/IPO/LoopExtractor.cpp:1.26
--- llvm/lib/Transforms/IPO/LoopExtractor.cpp:1.25 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/LoopExtractor.cpp Wed May 2 16:39:19 2007
@@ -34,7 +34,7 @@
// Module passes to require FunctionPasses, so we can't get loop info if we're
// not a function pass.
struct VISIBILITY_HIDDEN LoopExtractor : public FunctionPass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
unsigned NumLoops;
LoopExtractor(unsigned numLoops = ~0)
@@ -51,17 +51,17 @@
}
};
- const int LoopExtractor::ID = 0;
+ const char LoopExtractor::ID = 0;
RegisterPass<LoopExtractor>
X("loop-extract", "Extract loops into new functions");
/// SingleLoopExtractor - For bugpoint.
struct SingleLoopExtractor : public LoopExtractor {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
SingleLoopExtractor() : LoopExtractor(1) {}
};
- const int SingleLoopExtractor::ID = 0;
+ const char SingleLoopExtractor::ID = 0;
RegisterPass<SingleLoopExtractor>
Y("loop-extract-single", "Extract at most one loop into a new function");
} // End anonymous namespace
@@ -152,7 +152,7 @@
class BlockExtractorPass : public ModulePass {
std::vector<BasicBlock*> BlocksToNotExtract;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
BlockExtractorPass(std::vector<BasicBlock*> &B)
: ModulePass((intptr_t)&ID), BlocksToNotExtract(B) {}
BlockExtractorPass() : ModulePass((intptr_t)&ID) {}
@@ -160,7 +160,7 @@
bool runOnModule(Module &M);
};
- const int BlockExtractorPass::ID = 0;
+ const char BlockExtractorPass::ID = 0;
RegisterPass<BlockExtractorPass>
XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
}
Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.41 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.42
--- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.41 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Wed May 2 16:39:19 2007
@@ -109,7 +109,7 @@
bool IsTransformableFunction(const std::string& Name);
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
LowerSetJmp() : ModulePass((intptr_t)&ID) {}
void visitCallInst(CallInst& CI);
@@ -121,7 +121,7 @@
bool doInitialization(Module& M);
};
- const int LowerSetJmp::ID = 0;
+ const char LowerSetJmp::ID = 0;
RegisterPass<LowerSetJmp> X("lowersetjmp", "Lower Set Jump");
} // end anonymous namespace
Index: llvm/lib/Transforms/IPO/PruneEH.cpp
diff -u llvm/lib/Transforms/IPO/PruneEH.cpp:1.32 llvm/lib/Transforms/IPO/PruneEH.cpp:1.33
--- llvm/lib/Transforms/IPO/PruneEH.cpp:1.32 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/PruneEH.cpp Wed May 2 16:39:19 2007
@@ -35,7 +35,7 @@
namespace {
struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
PruneEH() : CallGraphSCCPass((intptr_t)&ID) {}
/// DoesNotUnwind - This set contains all of the functions which we have
@@ -53,7 +53,7 @@
void DeleteBasicBlock(BasicBlock *BB);
};
- const int PruneEH::ID = 0;
+ const char PruneEH::ID = 0;
RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info");
}
Index: llvm/lib/Transforms/IPO/RaiseAllocations.cpp
diff -u llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.41 llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.42
--- llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.41 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/RaiseAllocations.cpp Wed May 2 16:39:19 2007
@@ -35,7 +35,7 @@
Function *MallocFunc; // Functions in the module we are processing
Function *FreeFunc; // Initialized by doPassInitializationVirt
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
RaiseAllocations()
: ModulePass((intptr_t)&ID), MallocFunc(0), FreeFunc(0) {}
@@ -49,7 +49,7 @@
bool runOnModule(Module &M);
};
- const int RaiseAllocations::ID = 0;
+ const char RaiseAllocations::ID = 0;
RegisterPass<RaiseAllocations>
X("raiseallocs", "Raise allocations from calls to instructions");
} // end anonymous namespace
Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.113 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.114
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.113 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Wed May 2 16:39:19 2007
@@ -152,7 +152,7 @@
/// @brief A ModulePass for optimizing well-known function calls.
class VISIBILITY_HIDDEN SimplifyLibCalls : public ModulePass {
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
SimplifyLibCalls() : ModulePass((intptr_t)&ID) {}
/// We need some target data for accurate signature details that are
@@ -376,7 +376,7 @@
TargetData *TD; ///< Cached TargetData
};
-const int SimplifyLibCalls::ID = 0;
+const char SimplifyLibCalls::ID = 0;
// Register the pass
RegisterPass<SimplifyLibCalls>
X("simplify-libcalls", "Simplify well-known library calls");
Index: llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp
diff -u llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp:1.6 llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp:1.7
--- llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp:1.6 Tue May 1 16:15:46 2007
+++ llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp Wed May 2 16:39:19 2007
@@ -27,12 +27,12 @@
/// @brief Pass to remove unused function declarations.
class VISIBILITY_HIDDEN StripDeadPrototypesPass : public ModulePass {
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
StripDeadPrototypesPass() : ModulePass((intptr_t)&ID) { }
virtual bool runOnModule(Module &M);
};
-const int StripDeadPrototypesPass::ID = 0;
+const char StripDeadPrototypesPass::ID = 0;
RegisterPass<StripDeadPrototypesPass> X("strip-dead-prototypes",
"Strip Unused Function Prototypes");
Index: llvm/lib/Transforms/IPO/StripSymbols.cpp
diff -u llvm/lib/Transforms/IPO/StripSymbols.cpp:1.16 llvm/lib/Transforms/IPO/StripSymbols.cpp:1.17
--- llvm/lib/Transforms/IPO/StripSymbols.cpp:1.16 Tue May 1 16:15:47 2007
+++ llvm/lib/Transforms/IPO/StripSymbols.cpp Wed May 2 16:39:19 2007
@@ -37,7 +37,7 @@
class VISIBILITY_HIDDEN StripSymbols : public ModulePass {
bool OnlyDebugInfo;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
StripSymbols(bool ODI = false)
: ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {}
@@ -48,7 +48,7 @@
}
};
- const int StripSymbols::ID = 0;
+ const char StripSymbols::ID = 0;
RegisterPass<StripSymbols> X("strip", "Strip all symbols from a module");
}
More information about the llvm-commits
mailing list