diff options
author | Devang Patel <dpatel@apple.com> | 2009-04-23 18:09:16 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-04-23 18:09:16 +0000 |
commit | a6acb390e70453fd129cdaa19bdf8b0e206081f5 (patch) | |
tree | e1d52250bf2e2be4d890b81cba27d750a80e3010 /clang/lib/CodeGen/CGDebugInfo.h | |
parent | 466af3eb461b017b731df1cf743a8d7fd9a168aa (diff) | |
download | bcm5719-llvm-a6acb390e70453fd129cdaa19bdf8b0e206081f5.tar.gz bcm5719-llvm-a6acb390e70453fd129cdaa19bdf8b0e206081f5.zip |
Handle corner case where clang-cc is invoked directly to compile preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file.
This patch takes conservative approach by not emitting more then one compile unit with isMain bit set.
llvm-svn: 69902
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 4a59ecaaa57..1581637f4a3 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -34,6 +34,7 @@ namespace CodeGen { /// the backend. class CGDebugInfo { CodeGenModule *M; + bool isMainCompileUnitCreated; llvm::DIFactory DebugFactory; SourceLocation CurLoc, PrevLoc; |