summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-07-12 22:26:07 +0000
committerBill Wendling <isanbard@gmail.com>2013-07-12 22:26:07 +0000
commit021c8ded04ece2830fc7d385c4f5f02ea40f4701 (patch)
tree875bab47c6531ed229cacb143b58242345c208ed /clang
parent4f73ff471125689807623a3a799b0c05107a2217 (diff)
downloadbcm5719-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.cpp1
-rw-r--r--clang/lib/CodeGen/CGCall.cpp2
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();
OpenPOWER on IntegriCloud