diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2024-01-19 15:10:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-19 15:10:57 -0800 |
commit | 593395f0da67e9c5e2e6de6fe364c313458a642a (patch) | |
tree | d26d68b337cd7c40a7ffea5da3e127e2fcff566b /llvm/tools/dsymutil | |
parent | 9396891271fd85b4f8922b16dd71e9433dc5fcb3 (diff) | |
download | llvm-593395f0da67e9c5e2e6de6fe364c313458a642a.zip llvm-593395f0da67e9c5e2e6de6fe364c313458a642a.tar.gz llvm-593395f0da67e9c5e2e6de6fe364c313458a642a.tar.bz2 |
[dsymutil] Fix spurious warnings in MachODebugMapParser (#78794)
When the MachODebugMapParser encounters an object file that cannot be
found on disk, it currently leaves the parser in an incoherent state,
resulting in spurious warnings that can in turn slow down dsymutil.
This fixes #78411.
rdar://117515153
Diffstat (limited to 'llvm/tools/dsymutil')
-rw-r--r-- | llvm/tools/dsymutil/MachODebugMapParser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp index 524a679..6a9f256 100644 --- a/llvm/tools/dsymutil/MachODebugMapParser.cpp +++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp @@ -186,6 +186,8 @@ void MachODebugMapParser::addCommonSymbols() { /// everything up to add symbols to the new one. void MachODebugMapParser::switchToNewDebugMapObject( StringRef Filename, sys::TimePoint<std::chrono::seconds> Timestamp) { + addCommonSymbols(); + resetParserState(); SmallString<80> Path(PathPrefix); sys::path::append(Path, Filename); @@ -206,9 +208,6 @@ void MachODebugMapParser::switchToNewDebugMapObject( return; } - addCommonSymbols(); - resetParserState(); - CurrentDebugMapObject = &Result->addDebugMapObject(Path, Timestamp, MachO::N_OSO); |