[PATCH] D92280: [NFC} fix "Target does not support MC emission!" Error in HowToUseJit Example.

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 24 03:12:20 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb3d7e761e347: [examples] Fix "Target does not support MC emission!" in HowToUseJIT example. (authored by lhames).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92280/new/

https://reviews.llvm.org/D92280

Files:
  llvm/examples/HowToUseJIT/CMakeLists.txt
  llvm/examples/HowToUseJIT/HowToUseJIT.cpp


Index: llvm/examples/HowToUseJIT/HowToUseJIT.cpp
===================================================================
--- llvm/examples/HowToUseJIT/HowToUseJIT.cpp
+++ llvm/examples/HowToUseJIT/HowToUseJIT.cpp
@@ -36,6 +36,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"
@@ -59,6 +60,7 @@
 
 int main() {
   InitializeNativeTarget();
+  LLVMInitializeNativeAsmPrinter();
 
   LLVMContext Context;
   
Index: llvm/examples/HowToUseJIT/CMakeLists.txt
===================================================================
--- llvm/examples/HowToUseJIT/CMakeLists.txt
+++ llvm/examples/HowToUseJIT/CMakeLists.txt
@@ -2,6 +2,8 @@
   Core
   ExecutionEngine
   Interpreter
+  MC
+  MCJIT
   Support
   nativecodegen
   )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92280.318820.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210124/7eecdbab/attachment.bin>


More information about the llvm-commits mailing list