[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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user