Change the PointerType api for creating pointer types. The old functionality of Point...
[oota-llvm.git] / lib / ExecutionEngine / ExecutionEngine.cpp
index 83c0094a493365ae7d5d27b83ca449e250ffe0e6..6c2d9c384194d0a7b034b63b8ff5b91106f8ac3f 100644 (file)
@@ -170,7 +170,7 @@ static void *CreateArgv(ExecutionEngine *EE,
   char *Result = new char[(InputArgv.size()+1)*PtrSize];
 
   DOUT << "ARGV = " << (void*)Result << "\n";
-  const Type *SBytePtr = PointerType::get(Type::Int8Ty);
+  const Type *SBytePtr = PointerType::getUnqual(Type::Int8Ty);
 
   for (unsigned i = 0; i != InputArgv.size(); ++i) {
     unsigned Size = InputArgv[i].size()+1;
@@ -255,7 +255,8 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
   // Check main() type
   unsigned NumArgs = Fn->getFunctionType()->getNumParams();
   const FunctionType *FTy = Fn->getFunctionType();
-  const Type* PPInt8Ty = PointerType::get(PointerType::get(Type::Int8Ty));
+  const Type* PPInt8Ty = 
+    PointerType::getUnqual(PointerType::getUnqual(Type::Int8Ty));
   switch (NumArgs) {
   case 3:
    if (FTy->getParamType(2) != PPInt8Ty) {