[llvm] 884fb45 - Update Kaleidoscope tutorial inline code

Erich Keane via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 12:02:59 PDT 2020


Author: Erich Keane
Date: 2020-06-12T12:02:35-07:00
New Revision: 884fb45ed2aaa053fa76ca8ffa3c9a9ca595bd65

URL: https://github.com/llvm/llvm-project/commit/884fb45ed2aaa053fa76ca8ffa3c9a9ca595bd65
DIFF: https://github.com/llvm/llvm-project/commit/884fb45ed2aaa053fa76ca8ffa3c9a9ca595bd65.diff

LOG: Update Kaleidoscope tutorial inline code

Reported on IRC, the tutorial code at the bottom of the page correctly
namespaces the FunctionPassManager, but the as-you-go code does not.
This patch adds the namespace to those.

Added: 
    

Modified: 
    llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
index 85c233c9d3d5..78aa31b30cd5 100644
--- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
+++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
@@ -142,7 +142,7 @@ for us:
       TheModule = std::make_unique<Module>("my cool jit", TheContext);
 
       // Create a new pass manager attached to it.
-      TheFPM = std::make_unique<FunctionPassManager>(TheModule.get());
+      TheFPM = std::make_unique<legacy::FunctionPassManager>(TheModule.get());
 
       // Do simple "peephole" optimizations and bit-twiddling optzns.
       TheFPM->add(createInstructionCombiningPass());
@@ -275,7 +275,7 @@ We also need to setup the data layout for the JIT:
       TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 
       // Create a new pass manager attached to it.
-      TheFPM = std::make_unique<FunctionPassManager>(TheModule.get());
+      TheFPM = std::make_unique<legacy::FunctionPassManager>(TheModule.get());
       ...
 
 The KaleidoscopeJIT class is a simple JIT built specifically for these


        


More information about the llvm-commits mailing list