[cfe-commits] r66120 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Wed Mar 4 17:55:07 PST 2009
Author: dpatel
Date: Wed Mar 4 19:55:07 2009
New Revision: 66120
URL: http://llvm.org/viewvc/llvm-project?rev=66120&view=rev
Log:
Set isMain bit for MainFile.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=66120&r1=66119&r2=66120&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Mar 4 19:55:07 2009
@@ -69,11 +69,13 @@
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
More information about the cfe-commits
mailing list