[llvm-commits] [llvm] r135173 - /llvm/trunk/lib/VMCore/Instruction.cpp
Chris Lattner
sabre at nondot.org
Thu Jul 14 11:57:51 PDT 2011
Author: lattner
Date: Thu Jul 14 13:57:51 2011
New Revision: 135173
URL: http://llvm.org/viewvc/llvm-project?rev=135173&view=rev
Log:
manually copy debugloc over to a new instruction in clone() instead
of calling getAllMetadata(). This is semantically identical, but doing
it this way avoids unpacking the DebugLoc.
Modified:
llvm/trunk/lib/VMCore/Instruction.cpp
Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=135173&r1=135172&r2=135173&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Thu Jul 14 13:57:51 2011
@@ -405,8 +405,10 @@
// Otherwise, enumerate and copy over metadata from the old instruction to the
// new one.
SmallVector<std::pair<unsigned, MDNode*>, 4> TheMDs;
- getAllMetadata(TheMDs);
+ getAllMetadataOtherThanDebugLoc(TheMDs);
for (unsigned i = 0, e = TheMDs.size(); i != e; ++i)
New->setMetadata(TheMDs[i].first, TheMDs[i].second);
+
+ New->setDebugLoc(getDebugLoc());
return New;
}
More information about the llvm-commits
mailing list