Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
735:eee9efe5b51f | 736:e4e50f4b58cd |
---|---|
139 std::string srcpath(FileName::path(m->srcfile->name->toChars())); | 139 std::string srcpath(FileName::path(m->srcfile->name->toChars())); |
140 if (!FileName::absolute(srcpath.c_str())) { | 140 if (!FileName::absolute(srcpath.c_str())) { |
141 llvm::sys::Path tmp = llvm::sys::Path::GetCurrentDirectory(); | 141 llvm::sys::Path tmp = llvm::sys::Path::GetCurrentDirectory(); |
142 tmp.appendComponent(srcpath); | 142 tmp.appendComponent(srcpath); |
143 srcpath = tmp.toString(); | 143 srcpath = tmp.toString(); |
144 if (*srcpath.rbegin() != '/' || *srcpath.rbegin() != '\\') | 144 if (!srcpath.empty() && *srcpath.rbegin() != '/' && *srcpath.rbegin() != '\\') |
145 srcpath = srcpath + '/'; | 145 srcpath = srcpath + '/'; |
146 } | 146 } |
147 vals[4] = DtoConstStringPtr(srcpath.c_str(), "llvm.metadata"); | 147 vals[4] = DtoConstStringPtr(srcpath.c_str(), "llvm.metadata"); |
148 vals[5] = DtoConstStringPtr("LDC (http://www.dsource.org/projects/ldc)", "llvm.metadata"); | 148 vals[5] = DtoConstStringPtr("LDC (http://www.dsource.org/projects/ldc)", "llvm.metadata"); |
149 | 149 |