summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp')
-rw-r--r--contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
index e4db235..1b3cf78 100644
--- a/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -35,7 +35,7 @@ namespace {
///
struct IPCP : public ModulePass {
static char ID; // Pass identification, replacement for typeid
- IPCP() : ModulePass(&ID) {}
+ IPCP() : ModulePass(ID) {}
bool runOnModule(Module &M);
private:
@@ -45,8 +45,8 @@ namespace {
}
char IPCP::ID = 0;
-static RegisterPass<IPCP>
-X("ipconstprop", "Interprocedural constant propagation");
+INITIALIZE_PASS(IPCP, "ipconstprop",
+ "Interprocedural constant propagation", false, false);
ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
@@ -94,7 +94,7 @@ bool IPCP::PropagateConstantsIntoArguments(Function &F) {
if (!isa<CallInst>(U) && !isa<InvokeInst>(U))
return false;
- CallSite CS = CallSite::get(cast<Instruction>(U));
+ CallSite CS(cast<Instruction>(U));
if (!CS.isCallee(UI))
return false;
@@ -219,7 +219,7 @@ bool IPCP::PropagateConstantReturn(Function &F) {
// constant.
bool MadeChange = false;
for (Value::use_iterator UI = F.use_begin(), E = F.use_end(); UI != E; ++UI) {
- CallSite CS = CallSite::get(*UI);
+ CallSite CS(*UI);
Instruction* Call = CS.getInstruction();
// Not a call instruction or a call instruction that's not calling F
OpenPOWER on IntegriCloud