revert r135172 until Devang and I figure out the right answer.

llvm-svn: 135191
This commit is contained in:
Chris Lattner 2011-07-14 21:25:42 +00:00
parent 993f2b6ccd
commit fb9f4926d1
1 changed files with 2 additions and 3 deletions

View File

@ -167,10 +167,9 @@ void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &VMap,
} }
} }
// Remap attached metadata. Don't bother remapping DebugLoc, it can never // Remap attached metadata.
// have mappings to do.
SmallVector<std::pair<unsigned, MDNode *>, 4> MDs; SmallVector<std::pair<unsigned, MDNode *>, 4> MDs;
I->getAllMetadataOtherThanDebugLoc(MDs); I->getAllMetadata(MDs);
for (SmallVectorImpl<std::pair<unsigned, MDNode *> >::iterator for (SmallVectorImpl<std::pair<unsigned, MDNode *> >::iterator
MI = MDs.begin(), ME = MDs.end(); MI != ME; ++MI) { MI = MDs.begin(), ME = MDs.end(); MI != ME; ++MI) {
MDNode *Old = MI->second; MDNode *Old = MI->second;