aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-06-18 08:13:56 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-06-18 08:13:56 +0000
commitdf9d0f0ed2dca81033d8c7c1f632b01dc1d96c44 (patch)
tree0a62ee9d112eeb355246853bb8087e7c657f48b3
parentb7b39987bb1f9acc4cc0efe0f4c2d1ee5e2c9148 (diff)
Propagate calling conv for invokes too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73692 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/IRBuilder.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 316a8ad337..39aaebbedd 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/include/llvm/Support/IRBuilder.h
@@ -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() {