Skip to content

Commit 72709dc

Browse files
committed
Fixed a crash when parsing libraries on macOS.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 5dcdfa6 commit 72709dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CppParser/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4356,7 +4356,7 @@ ParserResult* Parser::ParseLibrary(const std::string& File)
43564356
return res;
43574357
}
43584358

4359-
llvm::StringRef FileEntry;
4359+
llvm::StringRef FileEntry("");
43604360

43614361
for (unsigned I = 0, E = opts->LibraryDirs.size(); I != E; ++I)
43624362
{
@@ -4368,7 +4368,7 @@ ParserResult* Parser::ParseLibrary(const std::string& File)
43684368
break;
43694369
}
43704370

4371-
if (FileEntry.empty() || !llvm::sys::fs::exists(FileEntry))
4371+
if (FileEntry.empty())
43724372
{
43734373
res->kind = ParserResultKind::FileNotFound;
43744374
return res;

0 commit comments

Comments
 (0)