summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-01-26 23:14:47 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-01-26 23:14:47 +0000
commit3df77bc67c4c50ba3730309fbd9204ceef40e766 (patch)
tree82ffaaa30c204e67f7f389192eb0c98e5e02faaa /clang/lib/CodeGen
parent731637567ea41ca6fc3552863db2c294ea654699 (diff)
downloadbcm5719-llvm-3df77bc67c4c50ba3730309fbd9204ceef40e766.tar.gz
bcm5719-llvm-3df77bc67c4c50ba3730309fbd9204ceef40e766.zip
[WinEH] Annotate calls to __RTtypeid with a funclet bundle
Clang's CodeGen has several paths which end up invoking or calling a function. The one that we used for calls to __RTtypeid did not appropriately annotate the call with a funclet bundle. This fixes PR26329. llvm-svn: 258877
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index b589ae3f88f..5bd452e1c97 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -3121,13 +3121,16 @@ CodeGenFunction::EmitCallOrInvoke(llvm::Value *Callee,
ArrayRef<llvm::Value *> Args,
const Twine &Name) {
llvm::BasicBlock *InvokeDest = getInvokeDest();
+ SmallVector<llvm::OperandBundleDef, 1> BundleList;
+ getBundlesForFunclet(Callee, CurrentFuncletPad, BundleList);
llvm::Instruction *Inst;
if (!InvokeDest)
- Inst = Builder.CreateCall(Callee, Args, Name);
+ Inst = Builder.CreateCall(Callee, Args, BundleList, Name);
else {
llvm::BasicBlock *ContBB = createBasicBlock("invoke.cont");
- Inst = Builder.CreateInvoke(Callee, ContBB, InvokeDest, Args, Name);
+ Inst = Builder.CreateInvoke(Callee, ContBB, InvokeDest, Args, BundleList,
+ Name);
EmitBlock(ContBB);
}
OpenPOWER on IntegriCloud