Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2013 07:34:34 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r259214 - in stable: 10/contrib/llvm/tools/clang/lib/CodeGen 9/contrib/llvm/tools/clang/lib/CodeGen
Message-ID:  <201312110734.rBB7YY68051124@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
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)

Modified: stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
==============================================================================
--- stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp	Wed Dec 11 06:28:44 2013	(r259213)
+++ stable/10/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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312110734.rBB7YY68051124>