mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -63,7 +63,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
ArgPromotion() : CallGraphSCCPass((intptr_t)&ID) {}
|
||||
|
||||
private:
|
||||
@@ -72,7 +72,7 @@ namespace {
|
||||
Function *DoPromotion(Function *F, std::vector<Argument*> &ArgsToPromote);
|
||||
};
|
||||
|
||||
const char ArgPromotion::ID = 0;
|
||||
char ArgPromotion::ID = 0;
|
||||
RegisterPass<ArgPromotion> X("argpromotion",
|
||||
"Promote 'by reference' arguments to scalars");
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ STATISTIC(NumMerged, "Number of global constants merged");
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass {
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ namespace {
|
||||
bool runOnModule(Module &M);
|
||||
};
|
||||
|
||||
const char ConstantMerge::ID = 0;
|
||||
char ConstantMerge::ID = 0;
|
||||
RegisterPass<ConstantMerge>X("constmerge","Merge Duplicate Global Constants");
|
||||
}
|
||||
|
||||
|
@@ -76,7 +76,7 @@ namespace {
|
||||
std::multimap<Function*, CallSite> CallSites;
|
||||
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
DAE() : ModulePass((intptr_t)&ID) {}
|
||||
bool runOnModule(Module &M);
|
||||
|
||||
@@ -95,17 +95,17 @@ namespace {
|
||||
|
||||
void RemoveDeadArgumentsFromFunction(Function *F);
|
||||
};
|
||||
const char DAE::ID = 0;
|
||||
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 char ID;
|
||||
static char ID;
|
||||
virtual bool ShouldHackArguments() const { return true; }
|
||||
};
|
||||
const char DAH::ID = 0;
|
||||
char DAH::ID = 0;
|
||||
RegisterPass<DAH> Y("deadarghaX0r",
|
||||
"Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)");
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab");
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN DTE : public ModulePass {
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ namespace {
|
||||
AU.addRequired<FindUsedTypes>();
|
||||
}
|
||||
};
|
||||
const char DTE::ID = 0;
|
||||
char DTE::ID = 0;
|
||||
RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ namespace {
|
||||
bool deleteFunc;
|
||||
bool reLink;
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
const char FunctionExtractorPass::ID = 0;
|
||||
char FunctionExtractorPass::ID = 0;
|
||||
RegisterPass<FunctionExtractorPass> X("extract", "Function Extractor");
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ STATISTIC(NumVariables, "Number of global variables removed");
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass {
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ namespace {
|
||||
bool SafeToDestroyConstant(Constant* C);
|
||||
bool RemoveUnusedGlobalValue(GlobalValue &GV);
|
||||
};
|
||||
const char GlobalDCE::ID = 0;
|
||||
char GlobalDCE::ID = 0;
|
||||
RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ namespace {
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<TargetData>();
|
||||
}
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
GlobalOpt() : ModulePass((intptr_t)&ID) {}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
@@ -63,7 +63,7 @@ namespace {
|
||||
bool ProcessInternalGlobal(GlobalVariable *GV,Module::global_iterator &GVI);
|
||||
};
|
||||
|
||||
const char GlobalOpt::ID = 0;
|
||||
char GlobalOpt::ID = 0;
|
||||
RegisterPass<GlobalOpt> X("globalopt", "Global Variable Optimizer");
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ namespace {
|
||||
/// IPCP - The interprocedural constant propagation pass
|
||||
///
|
||||
struct VISIBILITY_HIDDEN IPCP : public ModulePass {
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
IPCP() : ModulePass((intptr_t)&ID) {}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
@@ -41,7 +41,7 @@ namespace {
|
||||
bool PropagateConstantsIntoArguments(Function &F);
|
||||
bool PropagateConstantReturn(Function &F);
|
||||
};
|
||||
const char IPCP::ID = 0;
|
||||
char IPCP::ID = 0;
|
||||
RegisterPass<IPCP> X("ipconstprop", "Interprocedural constant propagation");
|
||||
}
|
||||
|
||||
|
@@ -32,12 +32,12 @@ STATISTIC(NumBounce , "Number of bounce functions created");
|
||||
namespace {
|
||||
class VISIBILITY_HIDDEN IndMemRemPass : public ModulePass {
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
IndMemRemPass() : ModulePass((intptr_t)&ID) {}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
const char IndMemRemPass::ID = 0;
|
||||
char IndMemRemPass::ID = 0;
|
||||
RegisterPass<IndMemRemPass> X("indmemrem","Indirect Malloc and Free Removal");
|
||||
} // end anonymous namespace
|
||||
|
||||
|
@@ -54,10 +54,10 @@ namespace {
|
||||
class VISIBILITY_HIDDEN SimpleInliner : public Inliner {
|
||||
std::map<const Function*, FunctionInfo> CachedFunctionInfo;
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
int getInlineCost(CallSite CS);
|
||||
};
|
||||
const char SimpleInliner::ID = 0;
|
||||
char SimpleInliner::ID = 0;
|
||||
RegisterPass<SimpleInliner> X("inline", "Function Integration/Inlining");
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ namespace {
|
||||
cl::desc("Control the amount of inlining to perform (default = 200)"));
|
||||
}
|
||||
|
||||
const char Inliner::ID = 0;
|
||||
char Inliner::ID = 0;
|
||||
Inliner::Inliner()
|
||||
: CallGraphSCCPass((intptr_t)&ID), InlineThreshold(InlineLimit) {}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ namespace llvm {
|
||||
/// perform the inlining operations that does not depend on the policy.
|
||||
///
|
||||
struct Inliner : public CallGraphSCCPass {
|
||||
static const char ID;
|
||||
static char ID;
|
||||
Inliner();
|
||||
|
||||
/// getAnalysisUsage - For this class, we declare that we require and preserve
|
||||
|
@@ -46,13 +46,13 @@ namespace {
|
||||
std::set<std::string> ExternalNames;
|
||||
bool DontInternalize;
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 char InternalizePass::ID = 0;
|
||||
char InternalizePass::ID = 0;
|
||||
RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols");
|
||||
} // end anonymous namespace
|
||||
|
||||
|
@@ -34,7 +34,7 @@ namespace {
|
||||
// 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 char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
unsigned NumLoops;
|
||||
|
||||
LoopExtractor(unsigned numLoops = ~0)
|
||||
@@ -51,17 +51,17 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
const char LoopExtractor::ID = 0;
|
||||
char LoopExtractor::ID = 0;
|
||||
RegisterPass<LoopExtractor>
|
||||
X("loop-extract", "Extract loops into new functions");
|
||||
|
||||
/// SingleLoopExtractor - For bugpoint.
|
||||
struct SingleLoopExtractor : public LoopExtractor {
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
SingleLoopExtractor() : LoopExtractor(1) {}
|
||||
};
|
||||
|
||||
const char SingleLoopExtractor::ID = 0;
|
||||
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 @@ namespace {
|
||||
class BlockExtractorPass : public ModulePass {
|
||||
std::vector<BasicBlock*> BlocksToNotExtract;
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ namespace {
|
||||
bool runOnModule(Module &M);
|
||||
};
|
||||
|
||||
const char BlockExtractorPass::ID = 0;
|
||||
char BlockExtractorPass::ID = 0;
|
||||
RegisterPass<BlockExtractorPass>
|
||||
XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ namespace {
|
||||
|
||||
bool IsTransformableFunction(const std::string& Name);
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
LowerSetJmp() : ModulePass((intptr_t)&ID) {}
|
||||
|
||||
void visitCallInst(CallInst& CI);
|
||||
@@ -121,7 +121,7 @@ namespace {
|
||||
bool doInitialization(Module& M);
|
||||
};
|
||||
|
||||
const char LowerSetJmp::ID = 0;
|
||||
char LowerSetJmp::ID = 0;
|
||||
RegisterPass<LowerSetJmp> X("lowersetjmp", "Lower Set Jump");
|
||||
} // end anonymous namespace
|
||||
|
||||
|
@@ -35,7 +35,7 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized");
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ namespace {
|
||||
void DeleteBasicBlock(BasicBlock *BB);
|
||||
};
|
||||
|
||||
const char PruneEH::ID = 0;
|
||||
char PruneEH::ID = 0;
|
||||
RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info");
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,7 @@ namespace {
|
||||
Function *MallocFunc; // Functions in the module we are processing
|
||||
Function *FreeFunc; // Initialized by doPassInitializationVirt
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
RaiseAllocations()
|
||||
: ModulePass((intptr_t)&ID), MallocFunc(0), FreeFunc(0) {}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace {
|
||||
bool runOnModule(Module &M);
|
||||
};
|
||||
|
||||
const char RaiseAllocations::ID = 0;
|
||||
char RaiseAllocations::ID = 0;
|
||||
RegisterPass<RaiseAllocations>
|
||||
X("raiseallocs", "Raise allocations from calls to instructions");
|
||||
} // end anonymous namespace
|
||||
|
@@ -152,7 +152,7 @@ public:
|
||||
/// @brief A ModulePass for optimizing well-known function calls.
|
||||
class VISIBILITY_HIDDEN SimplifyLibCalls : public ModulePass {
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static 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 @@ private:
|
||||
TargetData *TD; ///< Cached TargetData
|
||||
};
|
||||
|
||||
const char SimplifyLibCalls::ID = 0;
|
||||
char SimplifyLibCalls::ID = 0;
|
||||
// Register the pass
|
||||
RegisterPass<SimplifyLibCalls>
|
||||
X("simplify-libcalls", "Simplify well-known library calls");
|
||||
|
@@ -27,12 +27,12 @@ namespace {
|
||||
/// @brief Pass to remove unused function declarations.
|
||||
class VISIBILITY_HIDDEN StripDeadPrototypesPass : public ModulePass {
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
StripDeadPrototypesPass() : ModulePass((intptr_t)&ID) { }
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
|
||||
const char StripDeadPrototypesPass::ID = 0;
|
||||
char StripDeadPrototypesPass::ID = 0;
|
||||
RegisterPass<StripDeadPrototypesPass> X("strip-dead-prototypes",
|
||||
"Strip Unused Function Prototypes");
|
||||
|
||||
|
@@ -37,7 +37,7 @@ namespace {
|
||||
class VISIBILITY_HIDDEN StripSymbols : public ModulePass {
|
||||
bool OnlyDebugInfo;
|
||||
public:
|
||||
static const char ID; // Pass identifcation, replacement for typeid
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
StripSymbols(bool ODI = false)
|
||||
: ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
const char StripSymbols::ID = 0;
|
||||
char StripSymbols::ID = 0;
|
||||
RegisterPass<StripSymbols> X("strip", "Strip all symbols from a module");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user