mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
[opaque pointer type] Serialize the type of an llvm::Function as a function type rather than a function pointer type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2935,10 +2935,9 @@ std::error_code BitcodeReader::ParseModule(bool Resume,
|
||||
Type *Ty = getTypeByID(Record[0]);
|
||||
if (!Ty)
|
||||
return Error("Invalid record");
|
||||
if (!Ty->isPointerTy())
|
||||
return Error("Invalid type for value");
|
||||
FunctionType *FTy =
|
||||
dyn_cast<FunctionType>(cast<PointerType>(Ty)->getElementType());
|
||||
if (auto *PTy = dyn_cast<PointerType>(Ty))
|
||||
Ty = PTy->getElementType();
|
||||
auto *FTy = dyn_cast<FunctionType>(Ty);
|
||||
if (!FTy)
|
||||
return Error("Invalid type for value");
|
||||
|
||||
|
Reference in New Issue
Block a user