summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorXiang1 Zhang <xiang1.zhang@intel.com>2022-07-12 10:16:24 +0800
committerXiang1 Zhang <xiang1.zhang@intel.com>2022-07-12 10:17:00 +0800
commita45dd3d8140eab78a4554484c2b0435582ee262a (patch)
treea9085a80214b8713c07965159e7dda6bb841ff72 /clang/lib/CodeGen/CodeGenModule.cpp
parent643786213b34c7bd971c14db63dfbae8bb979997 (diff)
[X86] Support -mstack-protector-guard-symbol
Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D129346
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 56ed59d1e3f1..cf954b7b9277 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -900,6 +900,9 @@ void CodeGenModule::Release() {
if (!getCodeGenOpts().StackProtectorGuardReg.empty())
getModule().setStackProtectorGuardReg(
getCodeGenOpts().StackProtectorGuardReg);
+ if (!getCodeGenOpts().StackProtectorGuardSymbol.empty())
+ getModule().setStackProtectorGuardSymbol(
+ getCodeGenOpts().StackProtectorGuardSymbol);
if (getCodeGenOpts().StackProtectorGuardOffset != INT_MAX)
getModule().setStackProtectorGuardOffset(
getCodeGenOpts().StackProtectorGuardOffset);