diff options
author | Josh Magee <joshua_magee@playstation.sony.com> | 2014-02-11 01:35:14 +0000 |
---|---|---|
committer | Josh Magee <joshua_magee@playstation.sony.com> | 2014-02-11 01:35:14 +0000 |
commit | e0fc1a80cba8b91e3943f3287e7dcf68c6bb9b7f (patch) | |
tree | 93c65c12a462c05648e3fef2b32203a7e13f4ff8 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a47009dbd3085dab76d95280a8327a0c987c03d1 (diff) | |
download | bcm5719-llvm-e0fc1a80cba8b91e3943f3287e7dcf68c6bb9b7f.tar.gz bcm5719-llvm-e0fc1a80cba8b91e3943f3287e7dcf68c6bb9b7f.zip |
[stackprotector] Add command line option -fstack-protector-strong
This option has the following effects:
* It adds the sspstrong IR attribute to each function within the CU.
* It defines the macro __SSP_STRONG__ with the value of 2.
Differential Revision: http://llvm-reviews.chandlerc.com/D2717
llvm-svn: 201120
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c0c1219f8d2..7b1eab9721d 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -651,6 +651,8 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if (LangOpts.getStackProtector() == LangOptions::SSPOn) B.addAttribute(llvm::Attribute::StackProtect); + else if (LangOpts.getStackProtector() == LangOptions::SSPStrong) + B.addAttribute(llvm::Attribute::StackProtectStrong); else if (LangOpts.getStackProtector() == LangOptions::SSPReq) B.addAttribute(llvm::Attribute::StackProtectReq); |