[Opaqueptrs][IR Serialization] Improve inlineasm [de]serialization
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 Dec 2021 10:42:11 +0000 (13:42 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 Dec 2021 10:54:37 +0000 (13:54 +0300)
commit62b1682570b1059e8c6542192159dcde32c13c30
treebd44a364a7255071f0b4205f5b127a36dbc5f99a
parenta5337d6a1c6701eb98e085fb69a6e33c36f9533f
[Opaqueptrs][IR Serialization] Improve inlineasm [de]serialization

The bitcode reader expected that the pointers are typed,
so that it can extract the function type for the assembly
so `bitc::CST_CODE_INLINEASM` did not explicitly store said function type.

I'm not really sure how the upgrade path will look for existing bitcode,
but i think we can easily support opaque pointers going forward,
by simply storing the function type.

Reviewed By: #opaque-pointers, nikic

Differential Revision: https://reviews.llvm.org/D116341
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/test/Bitcode/callbr.ll