diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-30 23:03:37 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-30 23:03:37 +0000 |
commit | 9e9a0d5fc26878e51a58a8b57900fcbf952c2691 (patch) | |
tree | 477eb7b58abe6134ff6accc805279396a77892e8 /lib/AsmParser/LLParser.cpp | |
parent | 124e6eb09d47674a4bac48a522e83e4513a970e5 (diff) |
Move more code back to 2.5 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 359a733cd9..d8ff4cc462 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1481,7 +1481,7 @@ LLParser::PerFunctionState::~PerFunctionState() { I = ForwardRefVals.begin(), E = ForwardRefVals.end(); I != E; ++I) if (!isa<BasicBlock>(I->second.first)) { I->second.first->replaceAllUsesWith( - P.getContext().getUndef(I->second.first->getType())); + UndefValue::get(I->second.first->getType())); delete I->second.first; I->second.first = 0; } @@ -1490,7 +1490,7 @@ LLParser::PerFunctionState::~PerFunctionState() { I = ForwardRefValIDs.begin(), E = ForwardRefValIDs.end(); I != E; ++I) if (!isa<BasicBlock>(I->second.first)) { I->second.first->replaceAllUsesWith( - P.getContext().getUndef(I->second.first->getType())); + UndefValue::get(I->second.first->getType())); delete I->second.first; I->second.first = 0; } @@ -2193,19 +2193,19 @@ bool LLParser::ConvertGlobalValIDToValue(const Type *Ty, ValID &ID, case ValID::t_Null: if (!isa<PointerType>(Ty)) return Error(ID.Loc, "null must be a pointer type"); - V = Context.getConstantPointerNull(cast<PointerType>(Ty)); + V = ConstantPointerNull::get(cast<PointerType>(Ty)); return false; case ValID::t_Undef: // FIXME: LabelTy should not be a first-class type. if ((!Ty->isFirstClassType() || Ty == Type::LabelTy) && !isa<OpaqueType>(Ty)) return Error(ID.Loc, "invalid type for undef constant"); - V = Context.getUndef(Ty); + V = UndefValue::get(Ty); return false; case ValID::t_EmptyArray: if (!isa<ArrayType>(Ty) || cast<ArrayType>(Ty)->getNumElements() != 0) return Error(ID.Loc, "invalid empty array initializer"); - V = Context.getUndef(Ty); + V = UndefValue::get(Ty); return false; case ValID::t_Zero: // FIXME: LabelTy should not be a first-class type. @@ -2764,7 +2764,7 @@ bool LLParser::ParseRet(Instruction *&Inst, BasicBlock *BB, RVs.push_back(RV); } - RV = Context.getUndef(PFS.getFunction().getReturnType()); + RV = UndefValue::get(PFS.getFunction().getReturnType()); for (unsigned i = 0, e = RVs.size(); i != e; ++i) { Instruction *I = InsertValueInst::Create(RV, RVs[i], i, "mrv"); BB->getInstList().push_back(I); |