[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:
@@ -695,8 +695,10 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
|
||||
|
||||
if (LangOpts.getStackProtector() == LangOptions::SSPOn)
|
||||
Builder.defineMacro("__SSP__");
|
||||
else if (LangOpts.getStackProtector() == LangOptions::SSPStrong)
|
||||
Builder.defineMacro("__SSP_STRONG__", "2");
|
||||
else if (LangOpts.getStackProtector() == LangOptions::SSPReq)
|
||||
Builder.defineMacro("__SSP_ALL__", "2");
|
||||
Builder.defineMacro("__SSP_ALL__", "3");
|
||||
|
||||
if (FEOpts.ProgramAction == frontend::RewriteObjC)
|
||||
Builder.defineMacro("__weak", "__attribute__((objc_gc(weak)))");
|
||||
|
||||
Reference in New Issue
Block a user