Drop @llvm.annotation and @llvm.ptr.annotation intrinsics during codegen.
The intrinsic calls are dropped, but the annotated value is propagated. Fixes PR 15253 Original patch by Zeng Bin! llvm-svn: 182387
This commit is contained in:
@@ -453,6 +453,12 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
||||
CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
|
||||
break;
|
||||
|
||||
case Intrinsic::annotation:
|
||||
case Intrinsic::ptr_annotation:
|
||||
// Just drop the annotation, but forward the value
|
||||
CI->replaceAllUsesWith(CI->getOperand(0));
|
||||
break;
|
||||
|
||||
case Intrinsic::var_annotation:
|
||||
break; // Strip out annotate intrinsic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user