Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp
index 87107d8..cc4739a 100644
--- a/lib/Target/MSIL/MSILWriter.cpp
+++ b/lib/Target/MSIL/MSILWriter.cpp
@@ -783,7 +783,7 @@
// Save as pointer type "void*"
printValueLoad(Inst->getOperand(1));
printSimpleInstruction("ldloca",Name.c_str());
- printIndirectSave(PointerType::get(IntegerType::get(8)));
+ printIndirectSave(PointerType::getUnqual(IntegerType::get(8)));
break;
case Intrinsic::vaend:
// Close argument list handle.
@@ -1002,7 +1002,8 @@
printSimpleInstruction("call",
"instance typedref [mscorlib]System.ArgIterator::GetNextArg()");
printSimpleInstruction("refanyval","void*");
- std::string Name = "ldind."+getTypePostfix(PointerType::get(IntegerType::get(8)),false);
+ std::string Name =
+ "ldind."+getTypePostfix(PointerType::getUnqual(IntegerType::get(8)),false);
printSimpleInstruction(Name.c_str());
}
@@ -1217,7 +1218,7 @@
const AllocaInst* AI = dyn_cast<AllocaInst>(&*I);
if (AI && !isa<GlobalVariable>(AI)) {
// Local variable allocation.
- Ty = PointerType::get(AI->getAllocatedType());
+ Ty = PointerType::getUnqual(AI->getAllocatedType());
Name = getValueName(AI);
Out << "\t.locals (" << getTypeName(Ty) << Name << ")\n";
} else if (I->getType()!=Type::VoidTy) {