[cfe-commits] r98385 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Fri Mar 12 13:04:27 PST 2010
Author: dpatel
Date: Fri Mar 12 15:04:27 2010
New Revision: 98385
URL: http://llvm.org/viewvc/llvm-project?rev=98385&view=rev
Log:
If main file name is empty then use "<unknown>".
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=98385&r1=98384&r2=98385&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Mar 12 15:04:27 2010
@@ -104,7 +104,10 @@
void CGDebugInfo::CreateCompileUnit() {
// Get absolute path name.
- llvm::sys::Path AbsFileName(CGM.getCodeGenOpts().MainFileName);
+ std::string MainFileName = CGM.getCodeGenOpts().MainFileName;
+ if (MainFileName.empty())
+ MainFileName = "<unknown>";
+ llvm::sys::Path AbsFileName(MainFileName);
AbsFileName.makeAbsolute();
unsigned LangTag;
More information about the cfe-commits
mailing list