diff options
author | Devang Patel <dpatel@apple.com> | 2007-05-03 01:11:54 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-05-03 01:11:54 +0000 |
commit | 1997473cf72957d0e70322e2fe6fe2ab141c58a6 (patch) | |
tree | c98464a35a7d5a7893b1ffa191981a820b34bff9 /lib/Transforms/Scalar | |
parent | 10c9a8211d48ddd34ebe4b0abea21917a8dc7ed4 (diff) | |
download | llvm-1997473cf72957d0e70322e2fe6fe2ab141c58a6.tar.gz llvm-1997473cf72957d0e70322e2fe6fe2ab141c58a6.tar.bz2 llvm-1997473cf72957d0e70322e2fe6fe2ab141c58a6.tar.xz |
Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
26 files changed, 56 insertions, 56 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index c7aae4be6e..9eb739e7f0 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -52,7 +52,7 @@ class VISIBILITY_HIDDEN ADCE : public FunctionPass { // The public interface for this class // public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid ADCE() : FunctionPass((intptr_t)&ID) {} // Execute the Aggressive Dead Code Elimination Algorithm @@ -107,7 +107,7 @@ private: } }; - const char ADCE::ID = 0; + char ADCE::ID = 0; RegisterPass<ADCE> X("adce", "Aggressive Dead Code Elimination"); } // End of anonymous namespace diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index b8f1d50b69..28e801236d 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -41,7 +41,7 @@ STATISTIC(NumMoved, "Number of basic blocks moved"); namespace { struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid BlockPlacement() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); @@ -73,7 +73,7 @@ namespace { void PlaceBlocks(BasicBlock *BB); }; - const char BlockPlacement::ID = 0; + char BlockPlacement::ID = 0; RegisterPass<BlockPlacement> X("block-placement", "Profile Guided Basic Block Placement"); } diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index a40d1330ad..c077f7c0ca 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -39,7 +39,7 @@ namespace { /// transformation profitability. const TargetLowering *TLI; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid CodeGenPrepare(const TargetLowering *tli = 0) : FunctionPass((intptr_t)&ID), TLI(tli) {} bool runOnFunction(Function &F); @@ -55,7 +55,7 @@ namespace { }; } -const char CodeGenPrepare::ID = 0; +char CodeGenPrepare::ID = 0; static RegisterPass<CodeGenPrepare> X("codegenprepare", "Optimize for code generation"); diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp index c1dd9edba9..84e9782a9d 100644 --- a/lib/Transforms/Scalar/CondPropagate.cpp +++ b/lib/Transforms/Scalar/CondPropagate.cpp @@ -31,7 +31,7 @@ STATISTIC(NumSwThread, "Number of CFG edges threaded through switches"); namespace { struct VISIBILITY_HIDDEN CondProp : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid CondProp() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); @@ -49,7 +49,7 @@ namespace { void RevectorBlockTo(BasicBlock *FromBB, BasicBlock *ToBB); }; - const char CondProp::ID = 0; + char CondProp::ID = 0; RegisterPass<CondProp> X("condprop", "Conditional Propagation"); } diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index 26d32604ad..8fbed88b13 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -34,7 +34,7 @@ STATISTIC(NumInstKilled, "Number of instructions killed"); namespace { struct VISIBILITY_HIDDEN ConstantPropagation : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid ConstantPropagation() : FunctionPass((intptr_t)&ID) {} bool runOnFunction(Function &F); @@ -44,7 +44,7 @@ namespace { } }; - const char ConstantPropagation::ID = 0; + char ConstantPropagation::ID = 0; RegisterPass<ConstantPropagation> X("constprop", "Simple constant propagation"); } diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index c6f4dd720b..d1d3fed354 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -225,7 +225,7 @@ namespace { std::map<BasicBlock*, RegionInfo> RegionInfoMap; ETForest *EF; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid CEE() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); @@ -288,7 +288,7 @@ namespace { bool SimplifyInstruction(Instruction *Inst, const RegionInfo &RI); }; - const char CEE::ID = 0; + char CEE::ID = 0; RegisterPass<CEE> X("cee", "Correlated Expression Elimination"); } diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 9a8b39f609..1469c66694 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -35,7 +35,7 @@ namespace { // DeadInstElimination pass implementation // struct VISIBILITY_HIDDEN DeadInstElimination : public BasicBlockPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid DeadInstElimination() : BasicBlockPass(intptr_t(&ID)) {} virtual bool runOnBasicBlock(BasicBlock &BB) { bool Changed = false; @@ -53,7 +53,7 @@ namespace { } }; - const char DeadInstElimination::ID = 0; + char DeadInstElimination::ID = 0; RegisterPass<DeadInstElimination> X("die", "Dead Instruction Elimination"); } @@ -67,7 +67,7 @@ namespace { // DeadCodeElimination pass implementation // struct DCE : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid DCE() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); @@ -77,7 +77,7 @@ namespace { } }; - const char DCE::ID = 0; + char DCE::ID = 0; RegisterPass<DCE> Y("dce", "Dead Code Elimination"); } diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index aef6653402..9a30994f4e 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -34,7 +34,7 @@ STATISTIC(NumOther , "Number of other instrs removed"); namespace { struct VISIBILITY_HIDDEN DSE : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid DSE() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F) { @@ -58,7 +58,7 @@ namespace { AU.addPreserved<AliasAnalysis>(); } }; - const char DSE::ID = 0; + char DSE::ID = 0; RegisterPass<DSE> X("dse", "Dead Store Elimination"); } diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index 2cf8b64d1e..fa9867a585 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/lib/Transforms/Scalar/GCSE.cpp @@ -37,7 +37,7 @@ STATISTIC(NumArgsRepl , "Number of function arguments replaced " "with constant values"); namespace { struct VISIBILITY_HIDDEN GCSE : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid GCSE() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); @@ -54,7 +54,7 @@ namespace { } }; - const char GCSE::ID = 0; + char GCSE::ID = 0; RegisterPass<GCSE> X("gcse", "Global Common Subexpression Elimination"); } diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index c7262a0fb5..4e18512a49 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -69,7 +69,7 @@ namespace { bool Changed; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid IndVarSimplify() : LoopPass((intptr_t)&ID) {} bool runOnLoop(Loop *L, LPPassManager &LPM); @@ -95,7 +95,7 @@ namespace { void DeleteTriviallyDeadInstructions(std::set<Instruction*> &Insts); }; - const char IndVarSimplify::ID = 0; + char IndVarSimplify::ID = 0; RegisterPass<IndVarSimplify> X("indvars", "Canonicalize Induction Variables"); } diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 8da33c51a4..b80d4d630a 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -76,7 +76,7 @@ namespace { TargetData *TD; bool MustPreserveLCSSA; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid InstCombiner() : FunctionPass((intptr_t)&ID) {} /// AddToWorkList - Add the specified instruction to the worklist if it @@ -361,7 +361,7 @@ namespace { Value *EvaluateInDifferentType(Value *V, const Type *Ty, bool isSigned); }; - const char InstCombiner::ID = 0; + char InstCombiner::ID = 0; RegisterPass<InstCombiner> X("instcombine", "Combine redundant instructions"); } diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index d3b4353872..27b0f2e89f 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -63,7 +63,7 @@ namespace { cl::desc("Disable memory promotion in LICM pass")); struct VISIBILITY_HIDDEN LICM : public LoopPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid LICM() : LoopPass((intptr_t)&ID) {} virtual bool runOnLoop(Loop *L, LPPassManager &LPM); @@ -204,7 +204,7 @@ namespace { std::map<Value*, AllocaInst*> &Val2AlMap); }; - const char LICM::ID = 0; + char LICM::ID = 0; RegisterPass<LICM> X("licm", "Loop Invariant Code Motion"); } diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index b746e1d6fb..9532bcf328 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -44,7 +44,7 @@ namespace { class VISIBILITY_HIDDEN LoopRotate : public LoopPass { public: - static const char ID; // Pass ID, replacement for typeid + static char ID; // Pass ID, replacement for typeid LoopRotate() : LoopPass((intptr_t)&ID) {} // Rotate Loop L as many times as possible. Return true if @@ -94,7 +94,7 @@ namespace { SmallVector<RenameData, MAX_HEADER_SIZE> LoopHeaderInfo; }; - const char LoopRotate::ID = 0; + char LoopRotate::ID = 0; RegisterPass<LoopRotate> X ("loop-rotate", "Rotate Loops"); } diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index c728d6e210..bf0484c292 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -143,7 +143,7 @@ namespace { const TargetLowering *TLI; public: - static const char ID; // Pass ID, replacement for typeid + static char ID; // Pass ID, replacement for typeid LoopStrengthReduce(const TargetLowering *tli = NULL) : LoopPass((intptr_t)&ID), TLI(tli) { } @@ -188,7 +188,7 @@ private: Loop *L, bool isOnlyStride); void DeleteTriviallyDeadInstructions(std::set<Instruction*> &Insts); }; - const char LoopStrengthReduce::ID = 0; + char LoopStrengthReduce::ID = 0; RegisterPass<LoopStrengthReduce> X("loop-reduce", "Loop Strength Reduction"); } diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index b3671a9f1a..e4be2d249a 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -49,7 +49,7 @@ namespace { class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { LoopInfo *LI; // The current loop information public: - static const char ID; // Pass ID, replacement for typeid + static char ID; // Pass ID, replacement for typeid LoopUnroll() : LoopPass((intptr_t)&ID) {} bool runOnLoop(Loop *L, LPPassManager &LPM); @@ -66,7 +66,7 @@ namespace { AU.addPreserved<LoopInfo>(); } }; - const char LoopUnroll::ID = 0; + char LoopUnroll::ID = 0; RegisterPass<LoopUnroll> X("loop-unroll", "Unroll loops"); } diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index b46c29c956..5fea7cbea9 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -69,7 +69,7 @@ namespace { SmallPtrSet<Value *,8> UnswitchedVals; public: - static const char ID; // Pass ID, replacement for typeid + static char ID; // Pass ID, replacement for typeid LoopUnswitch() : LoopPass((intptr_t)&ID) {} bool runOnLoop(Loop *L, LPPassManager &LPM); @@ -112,7 +112,7 @@ namespace { std::vector<Instruction*> &Worklist); void RemoveLoopFromHierarchy(Loop *L); }; - const char LoopUnswitch::ID = 0; + char LoopUnswitch::ID = 0; RegisterPass<LoopUnswitch> X("loop-unswitch", "Unswitch loops"); } diff --git a/lib/Transforms/Scalar/LowerGC.cpp b/lib/Transforms/Scalar/LowerGC.cpp index 9cf3ad1e8c..3a620dac6c 100644 --- a/lib/Transforms/Scalar/LowerGC.cpp +++ b/lib/Transforms/Scalar/LowerGC.cpp @@ -47,7 +47,7 @@ namespace { /// had zero roots. const Type *MainRootRecordType; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid LowerGC() : FunctionPass((intptr_t)&ID), GCRootInt(0), GCReadInt(0), GCWriteInt(0), GCRead(0), GCWrite(0), RootChain(0), MainRootRecordType(0) {} @@ -58,7 +58,7 @@ namespace { const StructType *getRootRecordType(unsigned NumRoots); }; - const char LowerGC::ID = 0; + char LowerGC::ID = 0; RegisterPass<LowerGC> X("lowergc", "Lower GC intrinsics, for GCless code generators"); } diff --git a/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp index c80d14a763..78b6214f2f 100644 --- a/lib/Transforms/Scalar/LowerPacked.cpp +++ b/lib/Transforms/Scalar/LowerPacked.cpp @@ -40,7 +40,7 @@ namespace { class VISIBILITY_HIDDEN LowerPacked : public FunctionPass, public InstVisitor<LowerPacked> { public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid LowerPacked() : FunctionPass((intptr_t)&ID) {} /// @brief Lowers packed operations to scalar operations. @@ -107,7 +107,7 @@ private: std::vector<Instruction*> instrsToRemove; }; -const char LowerPacked::ID = 0; +char LowerPacked::ID = 0; RegisterPass<LowerPacked> X("lower-packed", "lowers packed operations to operations on smaller packed datatypes"); diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp index f9f8713f43..3b1b2cf777 100644 --- a/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -1989,7 +1989,7 @@ namespace { std::vector<DominatorTree::Node *> WorkList; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid PredicateSimplifier() : FunctionPass((intptr_t)&ID) {} bool runOnFunction(Function &F); @@ -2377,7 +2377,7 @@ namespace { } } - const char PredicateSimplifier::ID = 0; + char PredicateSimplifier::ID = 0; RegisterPass<PredicateSimplifier> X("predsimplify", "Predicate Simplifier"); } diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index da9efac2f3..929154f73d 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -69,7 +69,7 @@ namespace { std::map<Value*, unsigned> ValueRankMap; bool MadeChange; public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid Reassociate() : FunctionPass((intptr_t)&ID) {} bool runOnFunction(Function &F); @@ -92,7 +92,7 @@ namespace { void RemoveDeadBinaryOp(Value *V); }; - const char Reassociate::ID = 0; + char Reassociate::ID = 0; RegisterPass<Reassociate> X("reassociate", "Reassociate expressions"); } diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index 17f19d7994..53df484872 100644 --- a/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/lib/Transforms/Scalar/Reg2Mem.cpp @@ -33,7 +33,7 @@ STATISTIC(NumDemoted, "Number of registers demoted"); namespace { struct VISIBILITY_HIDDEN RegToMem : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid RegToMem() : FunctionPass((intptr_t)&ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -78,7 +78,7 @@ namespace { } }; - const char RegToMem::ID = 0; + char RegToMem::ID = 0; RegisterPass<RegToMem> X("reg2mem", "Demote all values to stack slots"); } diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index b90fc405ae..8aaf844ce1 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1334,7 +1334,7 @@ namespace { /// Sparse Conditional Constant Propagator. /// struct VISIBILITY_HIDDEN SCCP : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid SCCP() : FunctionPass((intptr_t)&ID) {} // runOnFunction - Run the Sparse Conditional Constant Propagation @@ -1347,7 +1347,7 @@ namespace { } }; - const char SCCP::ID = 0; + char SCCP::ID = 0; RegisterPass<SCCP> X("sccp", "Sparse Conditional Constant Propagation"); } // end anonymous namespace @@ -1447,12 +1447,12 @@ namespace { /// Constant Propagation. /// struct VISIBILITY_HIDDEN IPSCCP : public ModulePass { - static const char ID; + static char ID; IPSCCP() : ModulePass((intptr_t)&ID) {} bool runOnModule(Module &M); }; - const char IPSCCP::ID = 0; + char IPSCCP::ID = 0; RegisterPass<IPSCCP> Y("ipsccp", "Interprocedural Sparse Conditional Constant Propagation"); } // end anonymous namespace diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index f0faa874b8..49436264ca 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -47,7 +47,7 @@ STATISTIC(NumGlobals, "Number of allocas copied from constant global"); namespace { struct VISIBILITY_HIDDEN SROA : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid SROA() : FunctionPass((intptr_t)&ID) {} bool runOnFunction(Function &F); @@ -84,7 +84,7 @@ namespace { static Instruction *isOnlyCopiedFromConstantGlobal(AllocationInst *AI); }; - const char SROA::ID = 0; + char SROA::ID = 0; RegisterPass<SROA> X("scalarrepl", "Scalar Replacement of Aggregates"); } diff --git a/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp index b8ebbdbe0e..cbd0d48c76 100644 --- a/lib/Transforms/Scalar/SimplifyCFG.cpp +++ b/lib/Transforms/Scalar/SimplifyCFG.cpp @@ -35,12 +35,12 @@ STATISTIC(NumSimpl, "Number of blocks simplified"); namespace { struct VISIBILITY_HIDDEN CFGSimplifyPass : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid CFGSimplifyPass() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); }; - const char CFGSimplifyPass::ID = 0; + char CFGSimplifyPass::ID = 0; RegisterPass<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG"); } diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index b218628baf..877e674699 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -43,14 +43,14 @@ namespace { class VISIBILITY_HIDDEN TailDup : public FunctionPass { bool runOnFunction(Function &F); public: - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid TailDup() : FunctionPass((intptr_t)&ID) {} private: inline bool shouldEliminateUnconditionalBranch(TerminatorInst *TI); inline void eliminateUnconditionalBranch(BranchInst *BI); }; - const char TailDup::ID = 0; + char TailDup::ID = 0; RegisterPass<TailDup> X("tailduplicate", "Tail Duplication"); } diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 056c2a1291..d911321ce8 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -67,7 +67,7 @@ STATISTIC(NumAccumAdded, "Number of accumulators introduced"); namespace { struct VISIBILITY_HIDDEN TailCallElim : public FunctionPass { - static const char ID; // Pass identifcation, replacement for typeid + static char ID; // Pass identifcation, replacement for typeid TailCallElim() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F); @@ -80,7 +80,7 @@ namespace { bool CanMoveAboveCall(Instruction *I, CallInst *CI); Value *CanTransformAccumulatorRecursion(Instruction *I, CallInst *CI); }; - const char TailCallElim::ID = 0; + char TailCallElim::ID = 0; RegisterPass<TailCallElim> X("tailcallelim", "Tail Call Elimination"); } |