Changeset a16764a6 for src/CodeGen


Ignore:
Timestamp:
Feb 28, 2018, 4:48:22 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
446ffa3
Parents:
6a8df56
Message:

Changed warning system to prepare for toggling warnings

Location:
src/CodeGen
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r6a8df56 ra16764a6  
    1818#include <list>                      // for _List_iterator, list, list<>::it...
    1919
    20 #include "Common/SemanticError.h"    // for SemanticError
    2120#include "Common/UniqueName.h"       // for UniqueName
    2221#include "Common/utility.h"          // for CodeLocation, toString
  • src/CodeGen/FixMain.cc

    r6a8df56 ra16764a6  
    3939        {
    4040                if(main_signature) {
    41                         throw SemanticError(functionDecl, "Multiple definition of main routine\n");
     41                        SemanticError(functionDecl, "Multiple definition of main routine\n");
    4242                }
    4343                main_signature.reset( functionDecl->clone() );
  • src/CodeGen/FixNames.cc

    r6a8df56 ra16764a6  
    118118                        int nargs = functionDecl->get_functionType()->get_parameters().size();
    119119                        if( !(nargs == 0 || nargs == 2 || nargs == 3) ) {
    120                                 throw SemanticError(functionDecl, "Main expected to have 0, 2 or 3 arguments\n");
     120                                SemanticError(functionDecl, "Main expected to have 0, 2 or 3 arguments\n");
    121121                        }
    122122                        functionDecl->get_statements()->get_kids().push_back( new ReturnStmt( new ConstantExpr( Constant::from_int( 0 ) ) ) );
Note: See TracChangeset for help on using the changeset viewer.