changeset 729:50d01791859c

Always add trailing slash to source path for debug info.
author Christian Kamm <kamm incasoftware de>
date Sun, 26 Oct 2008 17:31:05 +0100
parents 635f91212b78
children 09b88beffd2d
files gen/todebug.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/todebug.cpp	Sun Oct 26 14:12:03 2008 +0100
+++ b/gen/todebug.cpp	Sun Oct 26 17:31:05 2008 +0100
@@ -141,6 +141,8 @@
         llvm::sys::Path tmp = llvm::sys::Path::GetCurrentDirectory();
         tmp.appendComponent(srcpath);
         srcpath = tmp.toString();
+        if (*srcpath.rbegin() != '/' || *srcpath.rbegin() != '\\')
+            srcpath = srcpath + '/';
     }
     vals[4] = DtoConstStringPtr(srcpath.c_str(), "llvm.metadata");
     vals[5] = DtoConstStringPtr("LDC (http://www.dsource.org/projects/ldc)", "llvm.metadata");