[dsymutil] Do not mistakenly reuse the current object file when the next one isn't found.
llvm-svn: 246412
This commit is contained in:
parent
4e289f9d1e
commit
afeac301b1
@ -55,3 +55,7 @@ Ldebug_range:
|
||||
# CHECK-NEXT: DW_AT_low_pc{{.*}}(0x0000000000010000)
|
||||
# CHECK-NEXT: DW_AT_ranges{{.*}}(0x00000000)
|
||||
|
||||
# There was a bug that would use the currently active object file when a
|
||||
# debug map object isn't found. Check that we only linked one file.
|
||||
# CHECK-NOT: DW_TAG_compile_unit
|
||||
|
||||
|
||||
@ -2942,8 +2942,10 @@ DwarfLinker::loadObject(BinaryHolder &BinaryHolder, DebugMapObject &Obj,
|
||||
const DebugMap &Map) {
|
||||
auto ErrOrObjs =
|
||||
BinaryHolder.GetObjectFiles(Obj.getObjectFilename(), Obj.getTimestamp());
|
||||
if (std::error_code EC = ErrOrObjs.getError())
|
||||
if (std::error_code EC = ErrOrObjs.getError()) {
|
||||
reportWarning(Twine(Obj.getObjectFilename()) + ": " + EC.message());
|
||||
return EC;
|
||||
}
|
||||
auto ErrOrObj = BinaryHolder.Get(Map.getTriple());
|
||||
if (std::error_code EC = ErrOrObj.getError())
|
||||
reportWarning(Twine(Obj.getObjectFilename()) + ": " + EC.message());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user