From 8d545a18c1f0cc977e3f0669c678db8f0f06077f Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Wed, 20 Apr 2011 19:30:43 +0200 Subject: [PATCH] Fix crash when declaration is coming without Loc from the front-end. --- gen/todebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/todebug.cpp b/gen/todebug.cpp index c6e4a3fb..9447a3eb 100644 --- a/gen/todebug.cpp +++ b/gen/todebug.cpp @@ -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(