summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
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
commitd2f8be3629de8b87bb6fceaf8f8f4c9f59567c30 (patch)
treec89217410d617c0fb2021e3e8b5165ea4f74b1f6 /clang/lib/Frontend
parent63771c099e1c90ef898a3ffdd8761b92168240af (diff)
downloadbcm5719-llvm-d2f8be3629de8b87bb6fceaf8f8f4c9f59567c30.tar.gz
bcm5719-llvm-d2f8be3629de8b87bb6fceaf8f8f4c9f59567c30.zip
ASTUnit: Make sure to preserve the TargetInfo for later use.
llvm-svn: 90263
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index f647c8a2370..3f07b880f79 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud