From 50f6d3545785b061ece2fad2355bc914912db7cc Mon Sep 17 00:00:00 2001 From: Simon Dardis Date: Thu, 3 Aug 2017 14:01:17 +0000 Subject: [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 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 003ea55..cdc3b4b 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); -- cgit v1.1