Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/FixNames.cc

    raaa1a99a ra7c90d4  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 11 15:38:10 2016
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Mar  6 23:32:08 2017
     13// Update Count     : 15
    1414//
    1515
     
    3939        std::string mangle_main() {
    4040                FunctionType* main_type;
    41                 std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl(
    42                         "main",
    43                         DeclarationNode::NoStorageClass,
    44                         LinkageSpec::Cforall,
    45                         main_type = new FunctionType( Type::Qualifiers(), true ),
    46                         nullptr, false, false
    47                 ) };
     41                std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl( "main", DeclarationNode::StorageClasses(), LinkageSpec::Cforall,
     42                                                                                                                                   main_type = new FunctionType( Type::Qualifiers(), true ), nullptr )
     43                                };
    4844                main_type->get_returnVals().push_back(
    49                         new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
     45                        new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
    5046                );
    5147
    52                 auto&& name = SymTab::Mangler::mangle( mainDecl.get() );
     48                auto && name = SymTab::Mangler::mangle( mainDecl.get() );
    5349                // std::cerr << name << std::endl;
    5450                return name;
     
    5652        std::string mangle_main_args() {
    5753                FunctionType* main_type;
    58                 std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl(
    59                         "main",
    60                         DeclarationNode::NoStorageClass,
    61                         LinkageSpec::Cforall,
    62                         main_type = new FunctionType( Type::Qualifiers(), false ),
    63                         nullptr, false, false
    64                 ) };
     54                std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl( "main", DeclarationNode::StorageClasses(), LinkageSpec::Cforall,
     55                                                                                                                                   main_type = new FunctionType( Type::Qualifiers(), false ), nullptr )
     56                                };
    6557                main_type->get_returnVals().push_back(
    66                         new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
     58                        new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
    6759                );
    6860
    6961                mainDecl->get_functionType()->get_parameters().push_back(
    70                         new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
     62                        new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
    7163                );
    7264
    7365                mainDecl->get_functionType()->get_parameters().push_back(
    74                         new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0,
     66                        new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0,
    7567                        new PointerType( Type::Qualifiers(), new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Char ) ) ),
    7668                        nullptr )
Note: See TracChangeset for help on using the changeset viewer.