# HG changeset patch # User Christian Kamm # Date 1225125758 -3600 # Node ID e4e50f4b58cd1134fdffcced507024a387e1d8d8 # Parent eee9efe5b51fffdfd2985adfd591b3f302f39136 Fix debug path. diff -r eee9efe5b51f -r e4e50f4b58cd gen/todebug.cpp --- 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");