summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-09-21 20:39:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-09-21 20:39:32 +0000
commit86792438dc07ea1521ad254261536ecabffceb8a (patch)
tree50ab2128cd99c437b2f4d6a4f1c239ab53dbf35d /clang/lib/CodeGen/CGVTables.cpp
parent2efe53e448097e2f0f6d4a248c8aabfb716fec61 (diff)
downloadbcm5719-llvm-86792438dc07ea1521ad254261536ecabffceb8a.tar.gz
bcm5719-llvm-86792438dc07ea1521ad254261536ecabffceb8a.zip
Call CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they get
attributes like uwtable. Without uwtable a stack unwinder would be unable to go past the thunks. llvm-svn: 164411
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 76d2e9bc4bd..774def26e9c 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -466,6 +466,8 @@ void CodeGenVTables::EmitThunk(GlobalDecl GD, const ThunkInfo &Thunk,
return;
}
+ CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn);
+
if (ThunkFn->isVarArg()) {
// Varargs thunks are special; we can't just generate a call because
// we can't copy the varargs. Our implementation is rather
OpenPOWER on IntegriCloud