OSDN Git Service

Merging r370176:
authorHans Wennborg <hans@hanshq.net>
Wed, 28 Aug 2019 09:25:24 +0000 (09:25 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 28 Aug 2019 09:25:24 +0000 (09:25 +0000)
commit1df17763bacad1cc7c55c9259163a186c6fd7d5f
tree01ff5f362cbe34f77ba14d8a6fb02ecf25f652dc
parentbd3846bd30824d5e10f18ea8412d75640fd12b40
Merging r370176:
------------------------------------------------------------------------
r370176 | hans | 2019-08-28 11:21:56 +0200 (Wed, 28 Aug 2019) | 15 lines

[LLVM-C] Fix ByVal Attribute crashing

With the introduction of the typed byval attribute change there was no
way that the LLVM-C API could create the correct class Attribute. If a
program that uses the C API creates a ByVal attribute and annotates a
function with that attribute LLVM will crash when it assembles or write
that module containing the function out as bitcode.

This change is a minimal fix to at least allow code to work, this is
because the byval change is on the 9.0 and I don't want to introduce new
LLVM-C API this late in the release cycle.

By Jakob Bornecrantz!

Differential revision: https://reviews.llvm.org/D66144
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370178 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Core.cpp