Index: lib/Driver/ToolChains/Clang.cpp =================================================================== --- lib/Driver/ToolChains/Clang.cpp +++ lib/Driver/ToolChains/Clang.cpp @@ -4956,8 +4956,7 @@ } if (Arg *A = Args.getLastArg(options::OPT_pg)) - if (Args.hasFlag(options::OPT_fomit_frame_pointer, - options::OPT_fno_omit_frame_pointer, /*default=*/false)) + if (shouldUseFramePointer(Args, Triple)) D.Diag(diag::err_drv_argument_not_allowed_with) << "-fomit-frame-pointer" << A->getAsString(Args);