mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-29 05:31:43 +00:00
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
llvm-svn: 78955
This commit is contained in:
1 parent
590a7c780c
commit
a42ac6953b
11 files changed
+110
-70
No files matched your search
@@ -358,7 +358,7 @@ const Type *BitcodeReader::getTypeByID(unsigned ID, bool isTypeTable) {
|
||||
// The type table allows forward references. Push as many Opaque types as
|
||||
// needed to get up to ID.
|
||||
while (TypeList.size() <= ID)
|
||||
TypeList.push_back(OpaqueType::get());
|
||||
TypeList.push_back(OpaqueType::get(Context));
|
||||
return TypeList.back().get();
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ bool BitcodeReader::ParseTypeTable() {
|
||||
|
||||
if (NumRecords == TypeList.size()) {
|
||||
// If this is a new type slot, just append it.
|
||||
TypeList.push_back(ResultTy ? ResultTy : OpaqueType::get());
|
||||
TypeList.push_back(ResultTy ? ResultTy : OpaqueType::get(Context));
|
||||
++NumRecords;
|
||||
} else if (ResultTy == 0) {
|
||||
// Otherwise, this was forward referenced, so an opaque type was created,
|
||||
|
||||
Reference in new issue
Block a user