[PATCH] D60616: Make parseBitcodeFile use a named StructType, if it exists and matches.
Arnt Gulbrandsen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 07:24:39 PDT 2019
arnt created this revision.
arnt added reviewers: dnsampaio, evgeny777, lebedev.ri.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Until now, parseBitcodeFile() would use an already-existing StructType if
it EITHER had the right structure and no name, OR the right name and no
structure, but not if it had both the right name and the right structure.
This change makes parseBitcodeFile() check the struct and use it if
appropriate.
It still creates a new StructType with a new name if the existing type and
what it needs to read differs in structure.
It also add a new function to retrieve a named StructType by name. The new
function is a lookup-only function; it doesn't change anything at all.
Repository:
rL LLVM
https://reviews.llvm.org/D60616
Files:
llvm/include/llvm/IR/DerivedTypes.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/IR/Type.cpp
llvm/unittests/Bitcode/BitReaderTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60616.194879.patch
Type: text/x-patch
Size: 5659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190412/cc6521cc/attachment.bin>
More information about the llvm-commits
mailing list