[llvm] r374378 - [dsymutil] Move CommonSymbols.clear() in resetParserState.

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 09:37:38 PDT 2019


Author: jdevlieghere
Date: Thu Oct 10 09:37:38 2019
New Revision: 374378

URL: http://llvm.org/viewvc/llvm-project?rev=374378&view=rev
Log:
[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.

Modified:
    llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp

Modified: llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp?rev=374378&r1=374377&r2=374378&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp (original)
+++ llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp Thu Oct 10 09:37:38 2019
@@ -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::addCommonSymbo
       continue;
     }
   }
-  CommonSymbols.clear();
 }
 
 /// Create a new DebugMapObject. This function resets the state of the




More information about the llvm-commits mailing list