mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Check the error code and save a call to sys::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e96fec2e43
commit
27a41c1547
@ -312,10 +312,8 @@ LLVMSymbolizer::getOrCreateBinary(const std::string &Path) {
|
|||||||
// resource directory.
|
// resource directory.
|
||||||
const std::string &ResourcePath =
|
const std::string &ResourcePath =
|
||||||
getDarwinDWARFResourceForPath(Path);
|
getDarwinDWARFResourceForPath(Path);
|
||||||
bool ResourceFileExists = false;
|
error_code EC = createBinary(ResourcePath, ParsedDbgBinary);
|
||||||
if (!sys::fs::exists(ResourcePath, ResourceFileExists) &&
|
if (EC != errc::no_such_file_or_directory && !error(EC)) {
|
||||||
ResourceFileExists &&
|
|
||||||
!error(createBinary(ResourcePath, ParsedDbgBinary))) {
|
|
||||||
DbgBin = ParsedDbgBinary.take();
|
DbgBin = ParsedDbgBinary.take();
|
||||||
ParsedBinariesAndObjects.push_back(DbgBin);
|
ParsedBinariesAndObjects.push_back(DbgBin);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user