diff options
author | Simon Dardis <simon.dardis@imgtec.com> | 2017-08-03 14:01:17 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@imgtec.com> | 2017-08-03 14:01:17 +0000 |
commit | 50f6d3545785b061ece2fad2355bc914912db7cc (patch) | |
tree | 1e2da19439342843c8662df7d342880cf06ce346 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | b5563c6817de8c002f44b771410ea8ad3c3c9000 (diff) | |
download | bcm5719-llvm-50f6d3545785b061ece2fad2355bc914912db7cc.tar.gz bcm5719-llvm-50f6d3545785b061ece2fad2355bc914912db7cc.zip |
[mips] Implement -muninit-const-in-rodata
This option when combined with -mgpopt and -membedded-data places all
uninitialized constant variables in the read-only section.
Reviewers: atanasyan, nitesh.jain
Differential Revision: https://reviews.llvm.org/D35917
llvm-svn: 309940
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 003ea554713..cdc3b4b04a8 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -950,6 +950,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.Backchain = Args.hasArg(OPT_mbackchain); + Opts.UInitCstDataInROData = Args.hasArg(OPT_muninit_const_in_rodata); + Opts.EmitCheckPathComponentsToStrip = getLastArgIntValue( Args, OPT_fsanitize_undefined_strip_path_components_EQ, 0, Diags); |