aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-03-05 01:55:07 +0000
committerDevang Patel <dpatel@apple.com>2009-03-05 01:55:07 +0000
commit4db4c9cc3e668ab713a5d1a9bad342c939ec61c6 (patch)
tree846c5769e0e512ceeb3c672877ed7c9e8ebcc6b9 /lib/CodeGen/CGDebugInfo.cpp
parent21ff9c99d3df1e4a13e6820fc2aa7a8cc6673198 (diff)
Set isMain bit for MainFile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 63ba0dfd39..dcf34bbd2e 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -69,11 +69,13 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) {
const char *FileName = FE ? FE->getName() : "<unknown>";
const char *DirName = FE ? FE->getDir()->getName() : "<unknown>";
+ bool isMain = (FE == SM.getFileEntryForID(SM.getMainFileID()));
// Create new compile unit.
// FIXME: Handle other language IDs as well.
// FIXME: Do not know how to get clang version yet.
return Unit = DebugFactory.CreateCompileUnit(llvm::dwarf::DW_LANG_C89,
- FileName, DirName, "clang");
+ FileName, DirName, "clang",
+ isMain);
}
/// CreateType - Get the Basic type from the cache or create a new