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 | 87de6497f45243fbcef6dac5be6a641ca9331f61 (patch) | |
tree | a66bbbb7caa0e6af75b0c9db5e05165b5efcff81 /lib/CodeGen/CGDebugInfo.h | |
parent | b3cfd58c9b13325d994e5f9b5065e6a22d91911d (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.h')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 4a59ecaaa5..1581637f4a 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -34,6 +34,7 @@ namespace CodeGen { /// the backend. class CGDebugInfo { CodeGenModule *M; + bool isMainCompileUnitCreated; llvm::DIFactory DebugFactory; SourceLocation CurLoc, PrevLoc; |