diff options
author | Devang Patel <dpatel@apple.com> | 2009-06-16 18:02:02 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-06-16 18:02:02 +0000 |
commit | 9fc4341eecaf030b1e68630b8047db21501dad7a (patch) | |
tree | 74b46b29858f68d5caab6c4bbebaecabd2912b2f /clang/lib/CodeGen/CGDebugInfo.h | |
parent | bada785729f1d8a78463f2a5974347a797246dab (diff) | |
download | bcm5719-llvm-9fc4341eecaf030b1e68630b8047db21501dad7a.tar.gz bcm5719-llvm-9fc4341eecaf030b1e68630b8047db21501dad7a.zip |
It is possible that main input file does not have any symbol with debug info. To handle this edge case, always create main compile unit first.
This fixes PR 4228.
llvm-svn: 73520
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index de655800fa0..8f3368e4ebf 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -111,7 +111,9 @@ private: void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI, CGBuilderTy &Builder); - + /// createCompileUnit - Create a new unit for the given file. + llvm::DICompileUnit createCompileUnit(const char *FileName, bool isMain); + /// getOrCreateCompileUnit - Get the compile unit from the cache or create a /// new one if necessary. llvm::DICompileUnit getOrCreateCompileUnit(SourceLocation Loc); |