Mercurial > projects > ldc
diff gen/todebug.cpp @ 736:e4e50f4b58cd
Fix debug path.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 27 Oct 2008 17:42:38 +0100 |
parents | 50d01791859c |
children | 340acf1535d0 |
line wrap: on
line diff
--- a/gen/todebug.cpp Mon Oct 27 17:37:34 2008 +0100 +++ b/gen/todebug.cpp Mon Oct 27 17:42:38 2008 +0100 @@ -141,7 +141,7 @@ llvm::sys::Path tmp = llvm::sys::Path::GetCurrentDirectory(); tmp.appendComponent(srcpath); srcpath = tmp.toString(); - if (*srcpath.rbegin() != '/' || *srcpath.rbegin() != '\\') + if (!srcpath.empty() && *srcpath.rbegin() != '/' && *srcpath.rbegin() != '\\') srcpath = srcpath + '/'; } vals[4] = DtoConstStringPtr(srcpath.c_str(), "llvm.metadata");