[PATCH] D102450: [OpaquePtr] Make loads and stores work with opaque pointers
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 13 19:04:33 PDT 2021
dblaikie added inline comments.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3849
"type of pointer operand");
- if (!PointerType::isLoadableOrStorableType(ElemType))
- return error("Cannot load/store from pointer");
+ if (!ValType->isFirstClassType())
+ return error("Load/Store operand must be a pointer to a first class type");
----------------
Is this for sure equivalent to the old code? The old code looks like it's equivalent to PointerType::isValidElementType which looks different to me to isFirstClassType?
================
Comment at: llvm/lib/IR/Verifier.cpp:3749
+ Type *ElTy = SI.getOperand(0)->getType();
+ if (!PTy->isOpaque()) {
+ Assert(PTy->isOpaqueOrPointeeTypeMatches(ElTy),
----------------
What's this condition for? If this is true, isOpaqueOrPointeeTypeMatches would be true and the assert would not fail, so that seems OK?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102450/new/
https://reviews.llvm.org/D102450
More information about the llvm-commits
mailing list