[svn r144] fixes

This commit is contained in:
Tomas Lindquist Olsen
2008-01-23 12:56:09 +01:00
parent 94c47aa1fa
commit 0c0bac2766
6 changed files with 113 additions and 4 deletions

View File

@@ -135,8 +135,11 @@ llvm::GlobalVariable* DtoDwarfCompileUnit(Module* m)
vals.push_back(DtoConstUint(DW_LANG_C));// _D)); // doesn't seem to work
vals.push_back(DtoConstStringPtr(m->srcfile->name->toChars(), "llvm.metadata"));
std::string srcpath(FileName::path(m->srcfile->name->toChars()));
if (srcpath.empty())
srcpath = ".";
if (srcpath.empty()) {
const char* str = get_current_dir_name();
assert(str != NULL);
srcpath = str;
}
vals.push_back(DtoConstStringPtr(srcpath.c_str(), "llvm.metadata"));
vals.push_back(DtoConstStringPtr("LLVMDC (http://www.dsource.org/projects/llvmdc)", "llvm.metadata"));