]> granicus.if.org Git - clang/commitdiff
Use function attributes to pass along the stack protector buffer size instead of...
authorBill Wendling <isanbard@gmail.com>
Fri, 12 Jul 2013 22:26:07 +0000 (22:26 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 12 Jul 2013 22:26:07 +0000 (22:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186218 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGCall.cpp

index e3a44f982dad21b9047915f5a589ca9467882958..04355e252e06b9d6f67a5f0bb2aa4010b49b25ec 100644 (file)
@@ -458,7 +458,6 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
   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,
index 9ed50ec67d04cef788acbaa3baf02cf253c65827..45c6790940d965db32ec5ad1e1acd0de6a616661 100644 (file)
@@ -1070,6 +1070,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
                            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();