diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-09-21 20:39:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-09-21 20:39:32 +0000 |
commit | 86792438dc07ea1521ad254261536ecabffceb8a (patch) | |
tree | 50ab2128cd99c437b2f4d6a4f1c239ab53dbf35d /clang/lib/CodeGen/CGVTables.cpp | |
parent | 2efe53e448097e2f0f6d4a248c8aabfb716fec61 (diff) | |
download | bcm5719-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.cpp | 2 |
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 |