OSDN Git Service

Fix missing arguments in tutorial
authorHans Wennborg <hans@hanshq.net>
Fri, 12 Apr 2019 08:23:28 +0000 (08:23 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 12 Apr 2019 08:23:28 +0000 (08:23 +0000)
In tutorial "8. Kaleidoscope: Compiling to Object Code" a call to
TargetMachine->addPassesToEmitFile(pass, dest, FileType) is missing
nullptr as its 3rd value.

Patch by Sajjad Heydari!

Differential revision: https://reviews.llvm.org/D60369

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358267 91177308-0d34-0410-b5e6-96231b3b80d8

docs/tutorial/LangImpl08.rst

index da4e60f..4f28a2a 100644 (file)
@@ -157,7 +157,7 @@ pass:
   legacy::PassManager pass;
   auto FileType = TargetMachine::CGFT_ObjectFile;
 
-  if (TargetMachine->addPassesToEmitFile(pass, dest, FileType)) {
+  if (TargetMachine->addPassesToEmitFile(pass, dest, nullptr, FileType)) {
     errs() << "TargetMachine can't emit a file of this type";
     return 1;
   }