mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4692be11a9
commit
4baa510f48
@ -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…
Reference in New Issue
Block a user