Ignore:
Timestamp:
May 18, 2015, 11:20:23 AM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
51587aa
Parents:
a32b204
Message:

licencing: third groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SymTab/TypeTable.h

    ra32b204 r0dd3a2f  
    1 #ifndef SYMTAB_TYPETABLE_H
    2 #define SYMTAB_TYPETABLE_H
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// TypeTable.h --
     8//
     9// Author           : Richard C. Bilson
     10// Created On       : Sun May 17 21:48:32 2015
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 21:49:49 2015
     13// Update Count     : 2
     14//
     15
     16#ifndef TYPETABLE_H
     17#define TYPETABLE_H
    318
    419#include <cassert>
     
    1429    class TypeTableConflictFunction : public std::binary_function< NamedTypeDecl *, NamedTypeDecl *, NamedTypeDecl * > {
    1530      public:
    16         NamedTypeDecl *operator()( NamedTypeDecl *existing, NamedTypeDecl *added ) {
    17             if ( existing->get_base() == 0 ) {
    18                 return added;
    19             } else if ( added->get_base() == 0 ) {
    20                 return existing;
    21             } else {
    22                 throw SemanticError( "redeclaration of ", added );
    23             }
    24             assert( false );
    25             return 0;
    26         }
     31                NamedTypeDecl *operator()( NamedTypeDecl *existing, NamedTypeDecl *added ) {
     32                        if ( existing->get_base() == 0 ) {
     33                                return added;
     34                        } else if ( added->get_base() == 0 ) {
     35                                return existing;
     36                        } else {
     37                                throw SemanticError( "redeclaration of ", added );
     38                        } // if
     39                        assert( false );
     40                        return 0;
     41                }
    2742    };
    2843
    2944    typedef StackTable< NamedTypeDecl, TypeTableConflictFunction > TypeTable;
    30 } // SymTab
     45} // namespace SymTab
    3146
    32 #endif // SYMTAB_TYPETABLE_H
     47#endif // TYPETABLE_H
     48
     49// Local Variables: //
     50// tab-width: 4 //
     51// mode: c++ //
     52// compile-command: "make install" //
     53// End: //
Note: See TracChangeset for help on using the changeset viewer.