Ignore:
Timestamp:
Nov 17, 2023, 10:40:21 AM (6 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
0f6d2884
Parents:
e580aa5
Message:

Reformating and clean-up in SymTab? directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cc

    re580aa5 rb0845f9  
    443443        code << str.substr( 0, start );
    444444
    445         code << "\t\t\t// GENERATED BY " __FILE__ << endl;
    446445        code <<
    447                 "\t\t\t// NOTES ON MANGLING:\n"
    448                 "\t\t\t// * Itanium spec says that Float80 encodes to \"e\" (like LongDouble), but the distinct lengths cause resolution problems.\n"
    449                 "\t\t\t// * Float128 is supposed to encode to \"g\", but I wanted it to mangle equal to LongDouble.\n"
    450                 "\t\t\t// * Mangling for non-standard complex types is by best guess\n"
    451                 "\t\t\t// * _FloatN is supposed to encode as \"DF\"N\"_\"; modified for same reason as above.\n"
    452                 "\t\t\t// * unused mangling identifiers:\n"
    453                 "\t\t\t//   - \"z\" ellipsis\n"
    454                 "\t\t\t//   - \"Dd\" IEEE 754r 64-bit decimal floating point (borrowed for _Float32x)\n"
    455                 "\t\t\t//   - \"De\" IEEE 754r 128-bit decimal floating point\n"
    456                 "\t\t\t//   - \"Df\" IEEE 754r 32-bit decimal floating point\n"
    457                 "\t\t\t//   - \"Dh\" IEEE 754r 16-bit decimal floating point (borrowed for _Float16)\n"
    458                 "\t\t\t//   - \"DF\"N\"_\" ISO/IEC TS 18661 N-bit binary floating point (_FloatN)\n"
    459                 "\t\t\t//   - \"Di\" char32_t\n"
    460                 "\t\t\t//   - \"Ds\" char16_t\n";
    461 
    462         code << "\t\t\tconst std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {" << endl;
     446                "// GENERATED BY " __FILE__ "\n"
     447                "// NOTES ON MANGLING:\n"
     448                "// * Itanium spec says that Float80 encodes to \"e\" (like LongDouble), but the distinct lengths cause resolution problems.\n"
     449                "// * Float128 is supposed to encode to \"g\", but I wanted it to mangle equal to LongDouble.\n"
     450                "// * Mangling for non-standard complex types is by best guess\n"
     451                "// * _FloatN is supposed to encode as \"DF\"N\"_\"; modified for same reason as above.\n"
     452                "// * unused mangling identifiers:\n"
     453                "//   - \"z\" ellipsis\n"
     454                "//   - \"Dd\" IEEE 754r 64-bit decimal floating point (borrowed for _Float32x)\n"
     455                "//   - \"De\" IEEE 754r 128-bit decimal floating point\n"
     456                "//   - \"Df\" IEEE 754r 32-bit decimal floating point\n"
     457                "//   - \"Dh\" IEEE 754r 16-bit decimal floating point (borrowed for _Float16)\n"
     458                "//   - \"DF\"N\"_\" ISO/IEC TS 18661 N-bit binary floating point (_FloatN)\n"
     459                "//   - \"Di\" char32_t\n"
     460                "//   - \"Ds\" char16_t\n";
     461
     462        code << "const std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {" << endl;
    463463        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
    464                 code << "\t\t\t\t\"" << graph[r].mangled << "\"," << setw(9 - strlen(graph[r].mangled)) << ' ' << "// " << graph[r].type << endl;
    465         } // for
    466         code << "\t\t\t}; // basicTypes" << endl;
    467         code << "\t\t\t";                                                                       // indentation for end marker
     464                code << "\t\"" << graph[r].mangled << "\"," << setw(9 - strlen(graph[r].mangled)) << ' ' << "// " << graph[r].type << endl;
     465        } // for
     466        code << "}; // basicTypes" << endl;
    468467
    469468        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ManglerCommon );
Note: See TracChangeset for help on using the changeset viewer.