diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 3 | ||||
| -rw-r--r-- | lib/Driver/ToolChains.cpp | 21 | ||||
| -rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 | 
3 files changed, 16 insertions, 10 deletions
| diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 064bc9532a6df..120dacfbb011e 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -2706,7 +2706,8 @@ Value *ScalarExprEmitter::EmitShl(const BinOpInfo &Ops) {      RHS = Builder.CreateIntCast(RHS, Ops.LHS->getType(), false, "sh_prom");    bool SanitizeBase = CGF.SanOpts.has(SanitizerKind::ShiftBase) && -                      Ops.Ty->hasSignedIntegerRepresentation(); +                      Ops.Ty->hasSignedIntegerRepresentation() && +                      !CGF.getLangOpts().isSignedOverflowDefined();    bool SanitizeExponent = CGF.SanOpts.has(SanitizerKind::ShiftExponent);    // OpenCL 6.3j: shift values are effectively % word size of LHS.    if (CGF.getLangOpts().OpenCL) diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 9bb7a59adc1c7..347aa29fde535 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -474,21 +474,26 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,      else if (isMacosxVersionLT(10, 6))        CmdArgs.push_back("-lgcc_s.10.5"); -    // For OS X, we thought we would only need a static runtime library when -    // targeting 10.4, to provide versions of the static functions which were -    // omitted from 10.4.dylib. +    // Originally for OS X, we thought we would only need a static runtime +    // library when targeting 10.4, to provide versions of the static functions +    // which were omitted from 10.4.dylib. This led to the creation of the 10.4 +    // builtins library.      //      // Unfortunately, that turned out to not be true, because Darwin system      // headers can still use eprintf on i386, and it is not exported from      // libSystem. Therefore, we still must provide a runtime library just for      // the tiny tiny handful of projects that *might* use that symbol. -    if (isMacosxVersionLT(10, 5)) { +    // +    // Then over time, we figured out it was useful to add more things to the +    // runtime so we created libclang_rt.osx.a to provide new functions when +    // deploying to old OS builds, and for a long time we had both eprintf and +    // osx builtin libraries. Which just seems excessive. So with PR 28855, we +    // are removing the eprintf library and expecting eprintf to be provided by +    // the OS X builtins library. +    if (isMacosxVersionLT(10, 5))        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.10.4.a"); -    } else { -      if (getTriple().getArch() == llvm::Triple::x86) -        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.eprintf.a"); +    else        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.osx.a"); -    }    }  } diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 57159fb597153..adcc38cbc4fdd 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -8567,7 +8567,7 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult &LHS, ExprResult &RHS,    // If LHS does not have a signed type and non-negative value    // then, the behavior is undefined. Warn about it. -  if (Left.isNegative()) { +  if (Left.isNegative() && !S.getLangOpts().isSignedOverflowDefined()) {      S.DiagRuntimeBehavior(Loc, LHS.get(),                            S.PDiag(diag::warn_shift_lhs_negative)                              << LHS.get()->getSourceRange()); | 
