diff options
author | dim <dim@FreeBSD.org> | 2013-12-11 07:34:34 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-11 07:34:34 +0000 |
commit | d6c28b7c7ee72da3931ec88ade64e4eb638af141 (patch) | |
tree | 9995d25f2f7b089d6b5617e76bfa0a5c5dd0270b /contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp | |
parent | e5a94b08044c77168e54224d34d4db37dee68e4d (diff) | |
download | FreeBSD-src-d6c28b7c7ee72da3931ec88ade64e4eb638af141.zip FreeBSD-src-d6c28b7c7ee72da3931ec88ade64e4eb638af141.tar.gz |
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
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp index 069cd5f..8559e4c 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp @@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDecl GD, const ThunkInfo &Thunk, } 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, |