ASTUnit: Make sure to preserve the TargetInfo for later use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90263 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index f647c8a..3f07b88 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -240,12 +240,13 @@
Act.Execute();
- // Steal the created context and preprocessor, and take back the source and
- // file managers.
+ // Steal the created target, context, and preprocessor, and take back the
+ // source and file managers.
AST->Ctx.reset(Clang.takeASTContext());
AST->PP.reset(Clang.takePreprocessor());
Clang.takeSourceManager();
Clang.takeFileManager();
+ AST->Target.reset(Clang.takeTarget());
Act.EndSourceFile();