Date: Mon, 20 Apr 2020 17:39:51 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360129 - head/contrib/llvm-project/clang/lib/CodeGen Message-ID: <202004201739.03KHdpYM023423@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Apr 20 17:39:51 2020 New Revision: 360129 URL: https://svnweb.freebsd.org/changeset/base/360129 Log: Merge commit ce5173c0e from llvm git (by Reid Kleckner): Use FinishThunk to finish musttail thunks FinishThunk, and the invariant of setting and then unsetting CurCodeDecl, was added in 7f416cc42638 (2015). The invariant didn't exist when I added this musttail codepath in ab2090d10765 (2014). Recently in 28328c3771, I started using this codepath on non-Windows platforms, and users reported problems during release testing (PR44987). The issue was already present for users of EH on i686-windows-msvc, so I added a test for that case as well. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D76444 This should fix 'Assertion failed: (!empty() && "popping exception stack when not empty"), function popTerminate, file /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h, line 583' when building the net-p2p/libtorrent-rasterbar PR: 244830 Reported by: jbeich, yuri MFC after: 6 weeks X-MFC-With: 358851 Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp Mon Apr 20 16:31:05 2020 (r360128) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp Mon Apr 20 17:39:51 2020 (r360129) @@ -437,7 +437,8 @@ void CodeGenFunction::EmitMustTailThunk(GlobalDecl GD, // Finish the function to maintain CodeGenFunction invariants. // FIXME: Don't emit unreachable code. EmitBlock(createBasicBlock()); - FinishFunction(); + + FinishThunk(); } void CodeGenFunction::generateThunk(llvm::Function *Fn, @@ -564,7 +565,7 @@ llvm::Constant *CodeGenVTables::maybeEmitThunk(GlobalD CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn); // Thunks for variadic methods are special because in general variadic - // arguments cannot be perferctly forwarded. In the general case, clang + // arguments cannot be perfectly forwarded. In the general case, clang // implements such thunks by cloning the original function body. However, for // thunks with no return adjustment on targets that support musttail, we can // use musttail to perfectly forward the variadic arguments.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004201739.03KHdpYM023423>