Copy metadata associated with CI
llvm-svn: 84114
This commit is contained in:
@@ -1113,6 +1113,10 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
|
||||
if (!CI->use_empty())
|
||||
CI->replaceAllUsesWith(NewCall);
|
||||
|
||||
// Copy any custom metadata attached with CI.
|
||||
llvm::MetadataContext &TheMetadata = CI->getContext().getMetadata();
|
||||
TheMetadata.copyMD(CI, NewCall);
|
||||
|
||||
CI->eraseFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user