Skip to content

Commit

Permalink
Merge pull request #35 from clang-randstruct/seedarg/global/wip
Browse files Browse the repository at this point in the history
Changed frandstruct to randstruct
  • Loading branch information
Tim Pugh authored Feb 27, 2019
2 parents d95e624 + 9cab894 commit ca6c6d8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/CC1Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def fcaret_diagnostics_max_lines :
HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">,
HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">;
def frandstruct_seed : Separate<["-"], "frandstruct-seed">, MetaVarName<"<N>">,
def randstruct_seed : Separate<["-"], "randstruct-seed">, MetaVarName<"<N>">,
HelpText<"Randomization seed for random struct layouts">;
def verify_EQ : CommaJoined<["-"], "verify=">,
MetaVarName<"<prefixes>">,
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>,
Flags<[CC1Option, CoreOption]>, HelpText<"Allow merging of constants">;
def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;
def frandstruct_seed_EQ : Joined<["-"], "frandstruct-seed=">, Group<f_Group>;
def randstruct_seed_EQ : Joined<["-"], "randstruct-seed=">, Group<f_Group>;
def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;
def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
Expand Down
6 changes: 3 additions & 3 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4405,9 +4405,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(Twine(N)));
}

// -frandstruct-seed parent process
if (Arg *A = Args.getLastArg(options::OPT_frandstruct_seed_EQ)) {
CmdArgs.push_back( "-frandstruct-seed" );
// -randstruct-seed parent process
if (Arg *A = Args.getLastArg(options::OPT_randstruct_seed_EQ)) {
CmdArgs.push_back( "-randstruct-seed" );
CmdArgs.push_back(A->getValue(0));
}

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.ActionName = A->getValue();
}
// child process handle arguments
if (const Arg* A = Args.getLastArg(OPT_frandstruct_seed)) {
if (const Arg* A = Args.getLastArg(OPT_randstruct_seed)) {
RandstructSeed = A->getValue(0);
}
Opts.AddPluginActions = Args.getAllArgValues(OPT_add_plugin);
Expand Down

0 comments on commit ca6c6d8

Please sign in to comment.