[llvm] 01b3627 - [examples] Fix Target does not support MC emission in ParallelJIT

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 09:16:51 PST 2021


Author: xgupta
Date: 2021-02-04T22:44:46+05:30
New Revision: 01b3627c71e99ba3dc533fa42df989e228b007b0

URL: https://github.com/llvm/llvm-project/commit/01b3627c71e99ba3dc533fa42df989e228b007b0
DIFF: https://github.com/llvm/llvm-project/commit/01b3627c71e99ba3dc533fa42df989e228b007b0.diff

LOG: [examples] Fix Target does not support MC emission in ParallelJIT

Added: 
    

Modified: 
    llvm/examples/ParallelJIT/CMakeLists.txt
    llvm/examples/ParallelJIT/ParallelJIT.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/ParallelJIT/CMakeLists.txt b/llvm/examples/ParallelJIT/CMakeLists.txt
index c42dfc85c14a..f4489f3ff1cd 100644
--- a/llvm/examples/ParallelJIT/CMakeLists.txt
+++ b/llvm/examples/ParallelJIT/CMakeLists.txt
@@ -3,6 +3,7 @@ set(LLVM_LINK_COMPONENTS
   ExecutionEngine
   Interpreter
   MC
+  MCJIT
   Support
   nativecodegen
   )

diff  --git a/llvm/examples/ParallelJIT/ParallelJIT.cpp b/llvm/examples/ParallelJIT/ParallelJIT.cpp
index 647846220766..7da105d201b9 100644
--- a/llvm/examples/ParallelJIT/ParallelJIT.cpp
+++ b/llvm/examples/ParallelJIT/ParallelJIT.cpp
@@ -22,6 +22,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 #include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/ExecutionEngine/MCJIT.h"
 #include "llvm/IR/Argument.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/Constants.h"
@@ -256,6 +257,7 @@ void* callFunc( void* param )
 
 int main() {
   InitializeNativeTarget();
+  LLVMInitializeNativeAsmPrinter();
   LLVMContext Context;
 
   // Create some module to put our function into it.


        


More information about the llvm-commits mailing list