diff --git a/bolt/lib/Core/AddressMap.cpp b/bolt/lib/Core/AddressMap.cpp --- a/bolt/lib/Core/AddressMap.cpp +++ b/bolt/lib/Core/AddressMap.cpp @@ -52,7 +52,8 @@ while (Cursor && !DE.eof(Cursor)) { const auto Input = DE.getAddress(Cursor); const auto Output = DE.getAddress(Cursor); - Parsed.Map.insert({Input, Output}); + if (!Parsed.Map.count(Input)) + Parsed.Map.insert({Input, Output}); } assert(Cursor && "Error reading address map section");