diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-12-09 01:01:28 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-12-09 01:01:28 +0000 |
| commit | b8dced5dfa3b5abba27898dfd0a8341995756584 (patch) | |
| tree | ae4868ba75b17320911ca9b9b97406a3a64a4513 /llvm/lib | |
| parent | 7471abd9ed0f224c6301ffa68cf02e21f900ef19 (diff) | |
| download | bcm5719-llvm-b8dced5dfa3b5abba27898dfd0a8341995756584.tar.gz bcm5719-llvm-b8dced5dfa3b5abba27898dfd0a8341995756584.zip | |
Don't drop attributes when inlining through "deopt" operand bundles
Test case attached (test case also checks that we don't drop the calling
convention, but that functionality was correct before this patch).
llvm-svn: 255088
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/IR/Instructions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index bba0ef2d7d3..6ec2e289970 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -307,6 +307,7 @@ CallInst *CallInst::Create(CallInst *CI, ArrayRef<OperandBundleDef> OpB, NewCI->setTailCallKind(CI->getTailCallKind()); NewCI->setCallingConv(CI->getCallingConv()); NewCI->SubclassOptionalData = CI->SubclassOptionalData; + NewCI->setAttributes(CI->getAttributes()); return NewCI; } @@ -594,6 +595,7 @@ InvokeInst *InvokeInst::Create(InvokeInst *II, ArrayRef<OperandBundleDef> OpB, II->getName(), InsertPt); NewII->setCallingConv(II->getCallingConv()); NewII->SubclassOptionalData = II->SubclassOptionalData; + NewII->setAttributes(II->getAttributes()); return NewII; } |

