diff options
| author | Wang, Pengfei <pengfei.wang@intel.com> | 2021-03-03 10:38:21 +0800 |
|---|---|---|
| committer | Wang, Pengfei <pengfei.wang@intel.com> | 2021-03-04 11:47:29 +0800 |
| commit | e7e67c930ae59151affcd57bd49d650e4dac3468 (patch) | |
| tree | 38c88e0561d8efea178a9ae2309c3c0ec8d998bc /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 266bb78f7d133a344992c5bfca61ef11ee152cb0 (diff) | |
Add Windows ehcont section support (/guard:ehcont).
Add option /guard:ehcont
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D96709
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 802a13fb41fc..b23d995683bf 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -552,6 +552,10 @@ void CodeGenModule::Release() { // Function ID tables for Control Flow Guard (cfguard=1). getModule().addModuleFlag(llvm::Module::Warning, "cfguard", 1); } + if (CodeGenOpts.EHContGuard) { + // Function ID tables for EH Continuation Guard. + getModule().addModuleFlag(llvm::Module::Warning, "ehcontguard", 1); + } if (CodeGenOpts.OptimizationLevel > 0 && CodeGenOpts.StrictVTablePointers) { // We don't support LTO with 2 with different StrictVTablePointers // FIXME: we could support it by stripping all the information introduced |
