From: Jonas Devlieghere Date: Thu, 10 Oct 2019 16:37:38 +0000 (+0000) Subject: [dsymutil] Move CommonSymbols.clear() in resetParserState. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d52d6ae7d150f66f294db55ddf720972d5df2f6;p=llvm [dsymutil] Move CommonSymbols.clear() in resetParserState. This seems like a more natural place to clear the vector, especially since this method is clearing other data structures as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374378 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/dsymutil/MachODebugMapParser.cpp b/tools/dsymutil/MachODebugMapParser.cpp index 487fbfff50c..3292e948572 100644 --- a/tools/dsymutil/MachODebugMapParser.cpp +++ b/tools/dsymutil/MachODebugMapParser.cpp @@ -123,6 +123,7 @@ private: /// file. This is to be called after an object file is finished /// processing. void MachODebugMapParser::resetParserState() { + CommonSymbols.clear(); CurrentObjectAddresses.clear(); CurrentDebugMapObject = nullptr; } @@ -144,7 +145,6 @@ void MachODebugMapParser::addCommonSymbols() { continue; } } - CommonSymbols.clear(); } /// Create a new DebugMapObject. This function resets the state of the