mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 12:16:59 +00:00
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. llvm-svn: 135173
This commit is contained in:
parent
f9d3b2a8c3
commit
c7d5a58efc
@ -405,8 +405,10 @@ Instruction *Instruction::clone() const {
|
||||
// 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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user