From 01064ee25d3307ca83fc67bd4eda1af64f6d4bcc Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 13 Sep 2019 05:16:59 +0000 Subject: Revert "For PR17164: split -fno-lax-vector-conversion into three different" This breaks the LLDB build. I tried reaching out to Richard, but haven't gotten a reply yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371813 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 0e29e6d9d4..3db0b8827a 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -2265,7 +2265,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, if (Opts.OpenCL) { Opts.AltiVec = 0; Opts.ZVector = 0; - Opts.setLaxVectorConversions(LangOptions::LaxVectorConversionKind::None); + Opts.LaxVectorConversions = 0; Opts.setDefaultFPContractMode(LangOptions::FPC_On); Opts.NativeHalfType = 1; Opts.NativeHalfArgsAndReturns = 1; @@ -2667,18 +2667,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings); Opts.ConstStrings = Args.hasFlag(OPT_fconst_strings, OPT_fno_const_strings, Opts.ConstStrings); - if (Arg *A = Args.getLastArg(OPT_flax_vector_conversions_EQ)) { - using LaxKind = LangOptions::LaxVectorConversionKind; - if (auto Kind = llvm::StringSwitch>(A->getValue()) - .Case("none", LaxKind::None) - .Case("integer", LaxKind::Integer) - .Case("all", LaxKind::All) - .Default(llvm::None)) - Opts.setLaxVectorConversions(*Kind); - else - Diags.Report(diag::err_drv_invalid_value) - << A->getAsString(Args) << A->getValue(); - } + if (Args.hasArg(OPT_fno_lax_vector_conversions)) + Opts.LaxVectorConversions = 0; if (Args.hasArg(OPT_fno_threadsafe_statics)) Opts.ThreadsafeStatics = 0; Opts.Exceptions = Args.hasArg(OPT_fexceptions); -- cgit v1.2.1