From 4c12540497a765fa38337088e3dd17b78664e91e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sun, 26 Oct 2008 17:31:05 +0100 Subject: [PATCH] Always add trailing slash to source path for debug info. --- gen/todebug.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gen/todebug.cpp b/gen/todebug.cpp index 978f86c8..65f29570 100644 --- a/gen/todebug.cpp +++ b/gen/todebug.cpp @@ -141,6 +141,8 @@ static LLGlobalVariable* dwarfCompileUnit(Module* m) 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");