diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-31 20:28:14 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-31 20:28:14 +0000 |
commit | 5a1acd99126d8b867aef4a785aae635fb98b6c08 (patch) | |
tree | 4a7049e4b83ac61c1b374bbb168e359ff4d5268a /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | ef3ef7f645cd4f070e426ed781f0104bcffb45d7 (diff) | |
download | bcm5719-llvm-5a1acd99126d8b867aef4a785aae635fb98b6c08.tar.gz bcm5719-llvm-5a1acd99126d8b867aef4a785aae635fb98b6c08.zip |
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 69df49796ae..f3e0b18573c 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -576,7 +576,6 @@ Function *ArgPromotion::DoPromotion(Function *F, AttributesVec.push_back(AttributeWithIndex::get(~0, attrs)); const Type *RetTy = FTy->getReturnType(); - LLVMContext &Context = RetTy->getContext(); // Work around LLVM bug PR56: the CWriter cannot emit varargs functions which // have zero fixed arguments. @@ -681,7 +680,7 @@ Function *ArgPromotion::DoPromotion(Function *F, } if (ExtraArgHack) - Args.push_back(Context.getNullValue(Type::Int32Ty)); + Args.push_back(Constant::getNullValue(Type::Int32Ty)); // Push any varargs arguments on the list for (; AI != CS.arg_end(); ++AI, ++ArgIndex) { @@ -845,7 +844,7 @@ Function *ArgPromotion::DoPromotion(Function *F, // Notify the alias analysis implementation that we inserted a new argument. if (ExtraArgHack) - AA.copyValue(Context.getNullValue(Type::Int32Ty), NF->arg_begin()); + AA.copyValue(Constant::getNullValue(Type::Int32Ty), NF->arg_begin()); // Tell the alias analysis that the old function is about to disappear. |