[PM] Update the examples to reflect the removal of the
[oota-llvm.git] / examples / Kaleidoscope / Chapter6 / toy.cpp
index 732f075632fc457241f913ce159237326590c200..8131aa1077b5769a61848475d501a25755a9e66d 100644 (file)
@@ -6,9 +6,9 @@
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/LegacyPassManager.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/Verifier.h"
-#include "llvm/PassManager.h"
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Transforms/Scalar.h"
 #include <cctype>
@@ -594,7 +594,7 @@ static PrototypeAST *ParseExtern() {
 static Module *TheModule;
 static IRBuilder<> Builder(getGlobalContext());
 static std::map<std::string, Value *> NamedValues;
-static FunctionPassManager *TheFPM;
+static legacy::FunctionPassManager *TheFPM;
 
 Value *ErrorV(const char *Str) {
   Error(Str);
@@ -1029,7 +1029,7 @@ int main() {
     exit(1);
   }
 
-  FunctionPassManager OurFPM(TheModule);
+  legacy::FunctionPassManager OurFPM(TheModule);
 
   // Set up the optimizer pipeline.  Start with registering info about how the
   // target lays out data structures.