forked from OSchip/llvm-project
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:
parent
b8b0ea330c
commit
81dfb30e4c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue