diff options
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/TypeSystem.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/TypeSystem.cc b/lib/CodeGen/TypeSystem.cc index 7763d35..a84200b 100644 --- a/lib/CodeGen/TypeSystem.cc +++ b/lib/CodeGen/TypeSystem.cc @@ -111,9 +111,9 @@ const TypeInfo *TypeSystem::resolve(const std::string &TypeName) const { return &It->second; } -const TypeInfo *TypeSystem::registerType(const std::string &TypeName, - Type *LLVMType, - TypeKind Kind) { +TypeInfo *TypeSystem::registerType(const std::string &TypeName, + Type *LLVMType, + TypeKind Kind) { TypeInfo Info; Info.Name = TypeName; Info.LLVMType = LLVMType; @@ -150,8 +150,7 @@ bool TypeSystem::declareUserType(const std::string &Name, TypeKind Kind, std::st return false; } - registerType(Name, LLVMType, Kind); - Types.find(Name)->second.IsClass = IsClass; + registerType(Name, LLVMType, Kind)->IsClass = IsClass; return true; } |
