Index: lib/Driver/ToolChains/Clang.cpp =================================================================== --- lib/Driver/ToolChains/Clang.cpp +++ lib/Driver/ToolChains/Clang.cpp @@ -3397,8 +3397,15 @@ CmdArgs.push_back("-dwarf-explicit-import"); // Enable param entry values functionlaity. - if (Args.hasArg(options::OPT_femit_param_entry_values)) + if (Args.hasArg(options::OPT_femit_param_entry_values) && + areOptimizationsEnabled(Args)) { CmdArgs.push_back("-femit-param-entry-values"); + CmdArgs.push_back("-mllvm"); + CmdArgs.push_back("-emit-entry-values=1"); + CmdArgs.push_back("-mllvm"); + CmdArgs.push_back("-emit-call-site-info=1"); + + } RenderDebugInfoCompressionArgs(Args, CmdArgs, D, TC); }