Changeset 6e7ed0aa


Ignore:
Timestamp:
Oct 31, 2023, 3:55:01 PM (14 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
fa761c2
Parents:
a137d5a
Message:

I forgot to move genName over to the new CodeGenerator? module. It isn't really a code gen thing, more a modified lookup.

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    ra137d5a r6e7ed0aa  
    12471247        }
    12481248
    1249 std::string genName( ast::DeclWithType const * decl ) {
    1250         if ( const OperatorInfo * opInfo = operatorLookup( decl->name ) ) {
    1251                 return opInfo->outputName;
    1252         } else {
    1253                 return decl->name;
    1254         }
    1255 }
    1256 
    12571249} // namespace CodeGen
    12581250
  • src/CodeGen/CodeGenerator.h

    ra137d5a r6e7ed0aa  
    186186        /// returns C-compatible name of declaration
    187187        std::string genName( DeclarationWithType * decl );
    188         std::string genName( ast::DeclWithType const * decl );
    189188
    190189        inline std::ostream & operator<<( std::ostream & os, const CodeGenerator::LineEnder & endl ) {
  • src/CodeGen/CodeGeneratorNew.cpp

    ra137d5a r6e7ed0aa  
    12471247}
    12481248
    1249 //std::string genName( ast::DeclWithType const * decl ) {}
     1249std::string genName( ast::DeclWithType const * decl ) {
     1250        if ( const OperatorInfo * opInfo = operatorLookup( decl->name ) ) {
     1251                return opInfo->outputName;
     1252        } else {
     1253                return decl->name;
     1254        }
     1255}
    12501256
    12511257} // namespace CodeGen
  • src/CodeGen/CodeGeneratorNew.hpp

    ra137d5a r6e7ed0aa  
    188188}
    189189
     190/// Returns the C-compatible name of the declaration.
     191std::string genName( ast::DeclWithType const * decl );
     192
    190193} // namespace CodeGen
  • src/Validate/FixReturnTypes.cpp

    ra137d5a r6e7ed0aa  
    1919#include "AST/Pass.hpp"
    2020#include "AST/Type.hpp"
    21 #include "CodeGen/CodeGenerator.h"
     21#include "CodeGen/CodeGeneratorNew.hpp"
    2222#include "ResolvExpr/Unify.h"
    2323
Note: See TracChangeset for help on using the changeset viewer.