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.
2 parents ca83e1c + 9320fd9 commit 0cf822cCopy full SHA for 0cf822c
Sources/LLVM/PointerType.swift
@@ -24,6 +24,12 @@ public struct PointerType: IRType {
24
/// - parameter addressSpace: The optional address space where the pointed-to
25
/// object resides.
26
public init(pointee: IRType, addressSpace: Int = 0) {
27
+ // FIXME: This class of invalid reference is not caught by Module.verify(),
28
+ // only `lli`.
29
+ if pointee is VoidType {
30
+ fatalError("Attempted to form pointer to VoidType - use pointer to IntType.int8 instead")
31
+ }
32
+
33
self.pointee = pointee
34
self.addressSpace = addressSpace
35
}
0 commit comments