IRGen: EmptyBoxType's representation cannot be nil because of a conflict with extra inhabitant assumption in indirect enums (#10326)

* IRGen: EmptyBoxType's representation cannot be nil because of a conflict with extra inhabitant assumption in indirect enums

We map nil to the .None case of Optional. Instead use a singleton object.

SR-5148
rdar://32618580
This commit is contained in:
Arnold Schwaighofer
2017-06-17 09:33:41 -07:00
committed by GitHub
parent 6f3b8ca60f
commit 48e889b51b
13 changed files with 113 additions and 5 deletions

View File

@@ -188,6 +188,8 @@ public:
llvm::Value *emitProjectBoxCall(llvm::Value *box, llvm::Value *typeMetadata);
llvm::Value *emitAllocEmptyBoxCall();
// Emit a reference to the canonical type metadata record for the given AST
// type. This can be used to identify the type at runtime. For types with
// abstraction difference, the metadata contains the layout information for