diff options
| author | Yuanfang Chen <yuanfang.chen@sony.com> | 2022-08-24 12:24:54 -0700 |
|---|---|---|
| committer | Yuanfang Chen <yuanfang.chen@sony.com> | 2022-08-29 12:12:19 -0700 |
| commit | 70248bfdea6c70008ca42bf03bb28ebdee252744 (patch) | |
| tree | 0b29fb4a93bb1d625fd324b33587180a1e00f82c /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | ce6989fd8a9fb2608f670de023fdd4611f47b811 (diff) | |
[Clang] Implement function attribute nouwtable
To have finer control of IR uwtable attribute generation. For target code generation,
IR nounwind and uwtable may have some interaction. However, for frontend, there are
no semantic interactions so the this new `nouwtable` is marked "SimpleHandler = 1".
Differential Revision: https://reviews.llvm.org/D132592
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 6294fe9e87d3..62e906a87af4 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1963,7 +1963,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, llvm::Function *F) { llvm::AttrBuilder B(F->getContext()); - if (CodeGenOpts.UnwindTables) + if ((!D || !D->hasAttr<NoUwtableAttr>()) && CodeGenOpts.UnwindTables) B.addUWTableAttr(llvm::UWTableKind(CodeGenOpts.UnwindTables)); if (CodeGenOpts.StackClashProtector) |
