aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 06c0e1f..c27168e 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1319,8 +1319,10 @@ void CodeGenModule::Release() {
1);
// Enable unwind v2 (epilog).
- if (CodeGenOpts.WinX64EHUnwindV2)
- getModule().addModuleFlag(llvm::Module::Warning, "winx64-eh-unwindv2", 1);
+ if (CodeGenOpts.getWinX64EHUnwindV2() != llvm::WinX64EHUnwindV2Mode::Disabled)
+ getModule().addModuleFlag(
+ llvm::Module::Warning, "winx64-eh-unwindv2",
+ static_cast<unsigned>(CodeGenOpts.getWinX64EHUnwindV2()));
// Indicate whether this Module was compiled with -fopenmp
if (getLangOpts().OpenMP && !getLangOpts().OpenMPSimd)