Fix crash when declaration is coming without Loc from the front-end.

This commit is contained in:
David Nadlinger
2011-04-20 19:30:43 +02:00
parent a5c1e1364b
commit 8d545a18c1

View File

@@ -51,7 +51,7 @@ static llvm::DIType dwarfTypeDescription(Type* type, const char* c_name);
llvm::DIFile DtoDwarfFile(Loc loc)
{
llvm::SmallString<128> path(loc.filename);
llvm::SmallString<128> path(loc.filename ? loc.filename : "");
llvm::sys::fs::make_absolute(path);
return gIR->dibuilder.createFile(