Propagate calling conv for invokes too
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 18 Jun 2009 08:13:56 +0000 (08:13 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 18 Jun 2009 08:13:56 +0000 (08:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73692 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/IRBuilder.h

index 316a8ad3371a1314392c2f47ed1f742db127f54b..39aaebbedd8c4a23ea87384bc096a1faa87e6543 100644 (file)
@@ -154,8 +154,10 @@ public:
   InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
                            BasicBlock *UnwindDest, InputIterator ArgBegin,
                            InputIterator ArgEnd, const char *Name = "") {
-    return Insert(InvokeInst::Create(Callee, NormalDest, UnwindDest,
-                                     ArgBegin, ArgEnd), Name);
+    return Insert(TransferAttributes(InvokeInst::Create(Callee,
+                                                        NormalDest, UnwindDest,
+                                                        ArgBegin, ArgEnd),
+                                     Callee), Name);
   }
 
   UnwindInst *CreateUnwind() {