aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-01 21:57:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-01 21:57:33 +0000
commit64a32baec6fdc7e5fbcba417a2754f78ab876245 (patch)
tree72fe44eb519ece171b93229dede0ccf59d9d93f5 /lib/Frontend/ASTUnit.cpp
parentc4e265f67e63d870b4a188be5af1bcd848214802 (diff)
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
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index f647c8a237..3f07b880f7 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -240,12 +240,13 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocation(const CompilerInvocation &CI,
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();