Try to unbreak Win build differently after 973519826edb76
authorNico Weber <thakis@chromium.org>
Thu, 2 Sep 2021 16:42:48 +0000 (12:42 -0400)
committerNico Weber <thakis@chromium.org>
Thu, 2 Sep 2021 18:45:56 +0000 (14:45 -0400)
commit5881dcff7e76a68323edc8bb3c6e14420ad9cf7c
tree93dbf53c03b9e9cdfa42d5e4ffd975126b16a44b
parenta270de359f46ee47f568af9b0e9c3849e7eefce8
Try to unbreak Win build differently after 973519826edb76

Looks like the MS STL wants StringMapKeyIterator::operator*() to be const.
Return the result by copy instead of reference to do that.
Assigning to a hash map key iterator doesn't make sense anyways.

Also reverts 123f811fe5b0b which is now hopefully no longer needed.

Differential Revision: https://reviews.llvm.org/D109167
clang/lib/Driver/ToolChains/Arch/X86.cpp
llvm/include/llvm/ADT/StringMap.h
llvm/unittests/ADT/StringMapTest.cpp