From owner-svn-src-all@FreeBSD.ORG Wed Dec 11 07:34:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7995A7A; Wed, 11 Dec 2013 07:34:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2A4112D6; Wed, 11 Dec 2013 07:34:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB7YYYd051119; Wed, 11 Dec 2013 07:34:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB7YYsh051118; Wed, 11 Dec 2013 07:34:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312110734.rBB7YYsh051118@svn.freebsd.org> From: Dimitry Andric Date: Wed, 11 Dec 2013 07:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259214 - in stable: 10/contrib/llvm/tools/clang/lib/CodeGen 9/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 07:34:34 -0000 Author: dim Date: Wed Dec 11 07:34:34 2013 New Revision: 259214 URL: http://svnweb.freebsd.org/changeset/base/259214 Log: MFC r259100: Pull in r196658 from upstream clang trunk: CodeGen: Don't emit linkage on thunks that aren't emitted because they're vararg. This can happen when we're trying to emit a thunk with available_externally linkage with optimization enabled but bail because it doesn't make sense for vararg functions. [LLVM] PR18098. This should fix clang "Broken module found, compilation aborted" errors when building the qt4-based dvbcut port. Reported by: se Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Wed Dec 11 06:28:44 2013 (r259213) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Wed Dec 11 07:34:34 2013 (r259214) @@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDec } else { // Normal thunk body generation. CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk); + if (UseAvailableExternallyLinkage) + ThunkFn->setLinkage(llvm::GlobalValue::AvailableExternallyLinkage); } - - if (UseAvailableExternallyLinkage) - ThunkFn->setLinkage(llvm::GlobalValue::AvailableExternallyLinkage); } void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD,