We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c10723 commit 1658f60Copy full SHA for 1658f60
llvm/include/llvm/IR/DerivedTypes.h
@@ -697,7 +697,10 @@ class PointerType : public Type {
697
[[deprecated("PointerType::getUnqual with pointee type is pending removal. "
698
"Use Context overload.")]]
699
static PointerType *getUnqual(Type *ElementType) {
700
- return PointerType::get(ElementType, 0);
+ assert(ElementType && "Can't get a pointer to <null> type!");
701
+ assert(isValidElementType(ElementType) &&
702
+ "Invalid type for pointer element!");
703
+ return PointerType::getUnqual(ElementType->getContext());
704
}
705
706
/// This constructs an opaque pointer to an object in the
0 commit comments