Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Done
-
None
-
ghx-label-6
Description
The naming and usage of the two LlvmCodegen::GetType() methods is confusing. They seem to serve multiple distinct purposes:
- GetType(const string&) is simple enough - it looks up a predeclared type by name.
- GetType(ColumnType) returns the internal representation of a column type. At some callsites it is used for this purpose. We should probably rename to GetInternalRepresentation() or something like that.
- GetType(ColumnType) is also used as a convenience function to get a specific integer type, e.g. GetType(TYPE_INT). Those callsites should probably just call codegen->int_type() instead of using the general-purpose GetType() function.