[lld] r176748 - Fix (possible) MSVC miscompile in debug mode.

Michael J. Spencer bigcheesegs at gmail.com
Fri Mar 8 17:41:27 PST 2013


Author: mspencer
Date: Fri Mar  8 19:41:27 2013
New Revision: 176748

URL: http://llvm.org/viewvc/llvm-project?rev=176748&view=rev
Log:
Fix (possible) MSVC miscompile in debug mode.

Modified:
    lld/trunk/lib/Passes/LayoutPass.cpp

Modified: lld/trunk/lib/Passes/LayoutPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=176748&r1=176747&r2=176748&view=diff
==============================================================================
--- lld/trunk/lib/Passes/LayoutPass.cpp (original)
+++ lld/trunk/lib/Passes/LayoutPass.cpp Fri Mar  8 19:41:27 2013
@@ -134,7 +134,8 @@ void LayoutPass::buildFollowOnTable(Muta
         // the root of the targetAtom to the root of the current chain
         auto iter = _followOnRoots.find(targetAtom);
         if (iter == _followOnRoots.end()) {
-          _followOnRoots[targetAtom] = _followOnRoots[ai];
+          auto tmp = _followOnRoots[ai];
+          _followOnRoots[targetAtom] = tmp;
         } else {
           // The followon is part of another chain
           if (iter->second == targetAtom) {





More information about the llvm-commits mailing list