aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Basic/Targets.cpp2
-rw-r--r--lib/CodeGen/CGCall.cpp4
-rw-r--r--lib/Frontend/InitPreprocessor.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index d1158a6c6f..9ca014d4ff 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -238,7 +238,7 @@ static void GetDarwinLanguageOptions(LangOptions &Opts,
// Blocks and stack protectors default to on for 10.6 (darwin10) and beyond.
if (Maj > 9) {
Opts.Blocks = 1;
- Opts.StackProtector = 1;
+ Opts.setStackProtectorMode(LangOptions::SSPOn);
}
// Non-fragile ABI (in 64-bit mode) default to on for 10.5 (darwin9) and
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 61b6737be1..8ff58914cb 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -392,9 +392,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
if (CompileOpts.NoImplicitFloat)
FuncAttrs |= llvm::Attribute::NoImplicitFloat;
- if (Features.StackProtector == 1)
+ if (Features.getStackProtectorMode() == LangOptions::SSPOn)
FuncAttrs |= llvm::Attribute::StackProtect;
- else if (Features.StackProtector == 2)
+ else if (Features.getStackProtectorMode() == LangOptions::SSPReq)
FuncAttrs |= llvm::Attribute::StackProtectReq;
QualType RetTy = FI.getReturnType();
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 554868fd27..05f9607355 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -424,9 +424,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
PickFP(&TI.getLongDoubleFormat(), -1/*FIXME*/, 17, 21, 33, 36));
DefineBuiltinMacro(Buf, MacroBuf);
- if (LangOpts.StackProtector == 1)
+ if (LangOpts.getStackProtectorMode() == LangOptions::SSPOn)
DefineBuiltinMacro(Buf, "__SSP__=1");
- else if (LangOpts.StackProtector == 2)
+ else if (LangOpts.getStackProtectorMode() == LangOptions::SSPReq)
DefineBuiltinMacro(Buf, "__SSP_ALL__=2");
// Get other target #defines.