Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 3db7ff9..7ff1de6 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -470,7 +470,7 @@
: M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0),
RegionStartFn(0), RegionEndFn(0),
DeclareFn(0) {
- EmptyStructPtr = VMContext.getPointerTypeUnqual(VMContext.getStructType());
+ EmptyStructPtr = PointerType::getUnqual(StructType::get());
}
/// getCastToEmpty - Return this descriptor as a Constant* with type '{}*'.
@@ -493,7 +493,7 @@
// Return Constant if previously defined.
if (Slot) return Slot;
- const PointerType *DestTy = VMContext.getPointerTypeUnqual(Type::Int8Ty);
+ const PointerType *DestTy = PointerType::getUnqual(Type::Int8Ty);
// If empty string then use a i8* null instead.
if (String.empty())
@@ -522,7 +522,7 @@
for (unsigned i = 0; i != NumTys; ++i)
Elts.push_back(getCastToEmpty(Tys[i]));
- Constant *Init = ConstantArray::get(VMContext.getArrayType(EmptyStructPtr,
+ Constant *Init = ConstantArray::get(ArrayType::get(EmptyStructPtr,
Elts.size()),
Elts.data(), Elts.size());
// If we already have this array, just return the uniqued version.
@@ -1075,7 +1075,7 @@
const Type *Ty = M->getTypeByName("llvm.dbg.global_variable.type");
if (!Ty) return 0;
- Ty = Context.getPointerType(Ty, 0);
+ Ty = PointerType::get(Ty, 0);
Value *Val = V->stripPointerCasts();
for (Value::use_iterator I = Val->use_begin(), E = Val->use_end();