[llvm-commits] [llvm] r135205 - /llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp

Devang Patel dpatel at apple.com
Thu Jul 14 15:14:06 PDT 2011


Author: dpatel
Date: Thu Jul 14 17:14:06 2011
New Revision: 135205

URL: http://llvm.org/viewvc/llvm-project?rev=135205&view=rev
Log:
Undo r135191 (i.e. reapply Chris's patch. Now linker maps NamedMDNodes first, so there is not any need to map DebugLoc).

Modified:
    llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp

Modified: llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp?rev=135205&r1=135204&r2=135205&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp Thu Jul 14 17:14:06 2011
@@ -167,9 +167,10 @@
     }
   }
 
-  // Remap attached metadata.
+  // Remap attached metadata.  Don't bother remapping DebugLoc, it can never
+  // have mappings to do.
   SmallVector<std::pair<unsigned, MDNode *>, 4> MDs;
-  I->getAllMetadata(MDs);
+  I->getAllMetadataOtherThanDebugLoc(MDs);
   for (SmallVectorImpl<std::pair<unsigned, MDNode *> >::iterator
        MI = MDs.begin(), ME = MDs.end(); MI != ME; ++MI) {
     MDNode *Old = MI->second;





More information about the llvm-commits mailing list