Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/FixNames.cc

    r843054c2 rf326f99  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixNames.cc -- 
     7// FixNames.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 23:36:42 2015
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Mon Apr 11 15:38:10 2016
    1313// Update Count     : 1
    1414//
     
    2626                virtual void visit( ObjectDecl *objectDecl );
    2727                virtual void visit( FunctionDecl *functionDecl );
     28
     29                virtual void visit( CompoundStmt *compoundStmt );
     30
     31          private:
     32                int scopeLevel = 1;
     33
     34                void fixDWT( DeclarationWithType *dwt );
    2835        };
    2936
     
    3340        }
    3441
    35         void fixDWT( DeclarationWithType *dwt ) {
     42        void FixNames::fixDWT( DeclarationWithType *dwt ) {
    3643                if ( dwt->get_name() != "" ) {
    3744                        if ( LinkageSpec::isDecoratable( dwt->get_linkage() ) ) {
    3845                                dwt->set_mangleName( SymTab::Mangler::mangle( dwt ) );
     46                                dwt->set_scopeLevel( scopeLevel );
    3947                        } // if
    4048                } // if
     
    5058                fixDWT( functionDecl );
    5159        }
     60
     61        void FixNames::visit( CompoundStmt *compoundStmt ) {
     62                scopeLevel++;
     63                Visitor::visit( compoundStmt );
     64                scopeLevel--;
     65        }
    5266} // namespace CodeGen
    5367
Note: See TracChangeset for help on using the changeset viewer.