Don't "take" the file manager and source manager when

ASTUnit::LoadFromCompilerInvocation() fails to create target
information.

llvm-svn: 98697
This commit is contained in:
Douglas Gregor 2010-03-17 00:32:06 +00:00
parent b8b0ea330c
commit 81dfb30e4c
1 changed files with 0 additions and 2 deletions

View File

@ -293,8 +293,6 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocation(CompilerInvocation *CI,
Clang.setTarget(TargetInfo::CreateTargetInfo(Clang.getDiagnostics(), Clang.setTarget(TargetInfo::CreateTargetInfo(Clang.getDiagnostics(),
Clang.getTargetOpts())); Clang.getTargetOpts()));
if (!Clang.hasTarget()) { if (!Clang.hasTarget()) {
Clang.takeSourceManager();
Clang.takeFileManager();
Clang.takeDiagnosticClient(); Clang.takeDiagnosticClient();
Clang.takeDiagnostics(); Clang.takeDiagnostics();
return 0; return 0;