]> granicus.if.org Git - clang/commitdiff
[ORC] Fix clang-interpreter example code broken by r368707.
authorDouglas Yung <douglas.yung@sony.com>
Wed, 14 Aug 2019 01:03:35 +0000 (01:03 +0000)
committerDouglas Yung <douglas.yung@sony.com>
Wed, 14 Aug 2019 01:03:35 +0000 (01:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368778 91177308-0d34-0410-b5e6-96231b3b80d8

examples/clang-interpreter/main.cpp

index 69808428a34daf0e50342dd9c5b21afc2022b179..b81b7ebbb61744516c11c6261a73355ee84b18a6 100644 (file)
@@ -61,11 +61,12 @@ private:
     return llvm::make_unique<SectionMemoryManager>();
   }
 
-  SimpleJIT(std::unique_ptr<TargetMachine> TM, DataLayout DL,
-            DynamicLibrarySearchGenerator ProcessSymbolsGenerator)
+  SimpleJIT(
+      std::unique_ptr<TargetMachine> TM, DataLayout DL,
+      std::unique_ptr<DynamicLibrarySearchGenerator> ProcessSymbolsGenerator)
       : TM(std::move(TM)), DL(std::move(DL)) {
     llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
-    ES.getMainJITDylib().setGenerator(std::move(ProcessSymbolsGenerator));
+    ES.getMainJITDylib().addGenerator(std::move(ProcessSymbolsGenerator));
   }
 
 public: