Kaleidoscope: Value => Metadata
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index 814ca61ccd67092e16de71181a36ca5a961c721e..961a0f89cac0bec1645193aa795301d1ca29743e 100644 (file)
@@ -836,7 +836,7 @@ void DebugInfo::emitLocation(ExprAST *AST) {
 }
 
 static DICompositeType CreateFunctionType(unsigned NumArgs, DIFile Unit) {
-  SmallVector<Value *, 8> EltTys;
+  SmallVector<Metadata *, 8> EltTys;
   DIType DblTy = KSDbgInfo.getDoubleTy();
 
   // Add the result type.
@@ -1444,10 +1444,11 @@ int main() {
 
   // Create the JIT.  This takes ownership of the module.
   std::string ErrStr;
-  TheExecutionEngine = EngineBuilder(std::move(Owner))
-                           .setErrorStr(&ErrStr)
-                           .setMCJITMemoryManager(new SectionMemoryManager())
-                           .create();
+  TheExecutionEngine =
+      EngineBuilder(std::move(Owner))
+          .setErrorStr(&ErrStr)
+          .setMCJITMemoryManager(llvm::make_unique<SectionMemoryManager>())
+          .create();
   if (!TheExecutionEngine) {
     fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str());
     exit(1);