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 | b292b8ce708d8d5fa4286f1bc2855d6ac0d0f526 (patch) | |
| tree | 4847eb648a3d471bdd4b7653a8f83ad5cb4224bd /llvm/lib/AsmParser | |
| parent | 5ac2f49516d8624d998873dbd322e22f0ee5f358 (diff) | |
| download | bcm5719-llvm-b292b8ce708d8d5fa4286f1bc2855d6ac0d0f526.tar.gz bcm5719-llvm-b292b8ce708d8d5fa4286f1bc2855d6ac0d0f526.zip | |
Move more code back to 2.5 APIs.
llvm-svn: 77635
Diffstat (limited to 'llvm/lib/AsmParser')
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 359a733cd91..d8ff4cc462b 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/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); |

