Changeset 59fdd0d


Ignore:
Timestamp:
Feb 3, 2025, 1:26:21 PM (7 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
7959e56
Parents:
54f70c6
Message:

Improve intermediate code dumps: don't lower zero_t/one_t to int until we're generating final C code; include a comment when we do.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cpp

    r54f70c6 r59fdd0d  
    268268void GenType::postvisit( ast::ZeroType const * type ) {
    269269        // Ideally these wouldn't hit codegen at all, but should be safe to make them ints.
    270         result = (options.pretty ? "zero_t " : "long int ") + result;
     270        result = ( options.genC ? "long int /*zero_t*/ " : "zero_t " ) + result;
    271271        handleQualifiers( type );
    272272}
     
    274274void GenType::postvisit( ast::OneType const * type ) {
    275275        // Ideally these wouldn't hit codegen at all, but should be safe to make them ints.
    276         result = (options.pretty ? "one_t " : "long int ") + result;
     276        result = ( options.genC ? "long int /*one_t*/ " : "one_t " ) + result;
    277277        handleQualifiers( type );
    278278}
Note: See TracChangeset for help on using the changeset viewer.