HLSL: Fix #1655; use "" for nullptr file names. Needs test cases.

This commit is contained in:
John Kessenich 2019-01-16 16:07:51 +07:00
parent d72f488cc6
commit b2395e9ddf
3 changed files with 6 additions and 5 deletions

View file

@ -250,7 +250,8 @@ struct TSourceLoc {
return nullptr;
return name->c_str();
}
TString* name; // descriptive name for this string
const char* getFilenameStr() const { return name == nullptr ? "" : name->c_str(); }
TString* name; // descriptive name for this string, when a textual name is available, otherwise nullptr
int string;
int line;
int column;