Use function attributes to pass along the stack protector buffer size instead of making it a target option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186218 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index e3a44f9..04355e2 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -458,7 +458,6 @@
   Options.DisableTailCalls = CodeGenOpts.DisableTailCalls;
   Options.TrapFuncName = CodeGenOpts.TrapFuncName;
   Options.PositionIndependentExecutable = LangOpts.PIELevel != 0;
-  Options.SSPBufferSize = CodeGenOpts.SSPBufferSize;
   Options.EnableSegmentedStacks = CodeGenOpts.EnableSegmentedStacks;
 
   TargetMachine *TM = TheTarget->createTargetMachine(Triple, TargetOpts.CPU,
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 9ed50ec..45c6790 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1070,6 +1070,8 @@
                            CodeGenOpts.UnsafeFPMath ? "true" : "false");
     FuncAttrs.addAttribute("use-soft-float",
                            CodeGenOpts.SoftFloat ? "true" : "false");
+    FuncAttrs.addAttribute("ssp-buffer-size",
+                           llvm::utostr(CodeGenOpts.SSPBufferSize));
   }
 
   QualType RetTy = FI.getReturnType();