From owner-svn-src-projects@freebsd.org Wed Aug 24 17:43:50 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FD20BC411C for ; Wed, 24 Aug 2016 17:43:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BDCB1152; Wed, 24 Aug 2016 17:43:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7OHhnIq040392; Wed, 24 Aug 2016 17:43:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7OHhn5l040388; Wed, 24 Aug 2016 17:43:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201608241743.u7OHhn5l040388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 24 Aug 2016 17:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r304771 - in projects/clang390-import/contrib/llvm/tools/clang/lib: CodeGen Driver Sema X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 17:43:50 -0000 Author: dim Date: Wed Aug 24 17:43:49 2016 New Revision: 304771 URL: https://svnweb.freebsd.org/changeset/base/304771 Log: Update clang to release_39 branch r279477. Modified: projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp projects/clang390-import/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp projects/clang390-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp Directory Properties: projects/clang390-import/contrib/llvm/tools/clang/ (props changed) Modified: projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp Wed Aug 24 17:43:08 2016 (r304770) +++ projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp Wed Aug 24 17:43:49 2016 (r304771) @@ -2706,7 +2706,8 @@ Value *ScalarExprEmitter::EmitShl(const 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) Modified: projects/clang390-import/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp ============================================================================== --- projects/clang390-import/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Wed Aug 24 17:43:08 2016 (r304770) +++ projects/clang390-import/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Wed Aug 24 17:43:49 2016 (r304771) @@ -474,21 +474,26 @@ void DarwinClang::AddLinkRuntimeLibArgs( 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"); - } } } Modified: projects/clang390-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp ============================================================================== --- projects/clang390-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp Wed Aug 24 17:43:08 2016 (r304770) +++ projects/clang390-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp Wed Aug 24 17:43:49 2016 (r304771) @@ -8567,7 +8567,7 @@ static void DiagnoseBadShiftValues(Sema& // 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());