Changeset ada4575 for src/SymTab


Ignore:
Timestamp:
Feb 15, 2019, 2:37:56 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
ee06e41b
Parents:
fba51ab
Message:

programmatically creation basic-type declarations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/ManglerCommon.cc

    rfba51ab rada4575  
    1010// Created On       : Sun May 17 21:44:03 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 14 08:12:17 2019
    13 // Update Count     : 25
     12// Last Modified On : Thu Feb 14 17:06:37 2019
     13// Update Count     : 26
    1414//
    1515
     
    2222                namespace Encoding {
    2323                        const std::string manglePrefix = "_X";
    24 #if 0
    25                         const std::string basicTypes[] = {
    26                                 "b",  // Bool
    27                                 "c",  // Char
    28                                 "a",  // SignedChar
    29                                 "h",  // UnsignedChar
    30                                 "s",  // ShortSignedInt
    31                                 "t",  // ShortUnsignedInt
    32                                 "i",  // SignedInt
    33                                 "j",  // UnsignedInt
    34                                 "l",  // LongSignedInt
    35                                 "m",  // LongUnsignedInt
    36                                 "x",  // LongLongSignedInt
    37                                 "y",  // LongLongUnsignedInt
    38                                 "f",  // Float
    39                                 "d",  // Double
    40                                 "e",  // LongDouble
    41                                 "Cf", // FloatComplex
    42                                 "Cd", // DoubleComplex
    43                                 "Ce", // LongDoubleComplex
    44                                 // Note: imaginary is not an overloadable type in C++
    45                                 // "If", // FloatImaginary
    46                                 // "Id", // DoubleImaginary
    47                                 // "Ie", // LongDoubleImaginary
    48                                 "n",  // SignedInt128
    49                                 "o",  // UnsignedInt128
    50                                 "Dq",  // Float80 -- TODO: itanium says Float80 and LongDouble both encode to "e", but doing this causes problems with constructing long double, because the cost tables are incorrect
    51                                 "g",  // Float128
    52                                 // "z", // ellipsis
    53                                 // "Dd" // # IEEE 754r decimal floating point (64 bits)
    54                                 // "De" // # IEEE 754r decimal floating point (128 bits)
    55                                 // "Df" // # IEEE 754r decimal floating point (32 bits)
    56                                 // "Dh" // # IEEE 754r half-precision floating point (16 bits)
    57                                 // "DF"N_ // # ISO/IEC TS 18661 binary floating point type _FloatN (N bits)
    58                                 // "Di" // char32_t
    59                                 // "Ds" // char16_t
    60                         };
    61                         static_assert(
    62                                 sizeof(basicTypes)/sizeof(basicTypes[0]) == BasicType::NUMBER_OF_BASIC_TYPES,
    63                                 "Each basic type kind should have a corresponding mangler letter"
    64                         );
    65 #endif
     24
    6625                        // GENERATED START, DO NOT EDIT
     26                        // GENERATED BY BasicTypes-gen.cc
    6727                        // NOTES ON MANGLING:
    6828                        // * Itanium spec says that Float80 encodes to "e" (like LongDouble), but the distinct lengths cause resolution problems.
     
    11878                        }; // basicTypes
    11979                        // GENERATED END
     80                        static_assert(
     81                                sizeof(basicTypes)/sizeof(basicTypes[0]) == BasicType::NUMBER_OF_BASIC_TYPES,
     82                                "Each basic type kind should have a corresponding mangler letter"
     83                        );
    12084
    12185                        const std::map<int, std::string> qualifiers = {
Note: See TracChangeset for help on using the changeset viewer.