diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-07-12 22:26:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-07-12 22:26:07 +0000 |
commit | 021c8ded04ece2830fc7d385c4f5f02ea40f4701 (patch) | |
tree | 875bab47c6531ed229cacb143b58242345c208ed /clang | |
parent | 4f73ff471125689807623a3a799b0c05107a2217 (diff) | |
download | bcm5719-llvm-021c8ded04ece2830fc7d385c4f5f02ea40f4701.tar.gz bcm5719-llvm-021c8ded04ece2830fc7d385c4f5f02ea40f4701.zip |
Use function attributes to pass along the stack protector buffer size instead of making it a target option.
llvm-svn: 186218
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index e3a44f982da..04355e252e0 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -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, diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 9ed50ec67d0..45c6790940d 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -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(); |