svn commit: r259214 - in stable: 10/contrib/llvm/tools/clang/lib/CodeGen 9/contrib/llvm/tools/clang/lib/CodeGen

Dimitry Andric dim at FreeBSD.org
Wed Dec 11 07:34:35 UTC 2013


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,


More information about the svn-src-all mailing list