1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[FileCollector] Ignore empty paths.

Don't insert empty strings into the StringSet<> because that triggers an
assert in its implementation.
This commit is contained in:
Jonas Devlieghere 2019-11-20 10:38:55 -08:00
parent 5c3ed730d8
commit c1440088ae

View File

@ -46,7 +46,11 @@ public:
private:
void addFileImpl(StringRef SrcPath);
bool markAsSeen(StringRef Path) { return Seen.insert(Path).second; }
bool markAsSeen(StringRef Path) {
if (Path.empty())
return false;
return Seen.insert(Path).second;
}
bool getRealPath(StringRef SrcPath, SmallVectorImpl<char> &Result);