Ignore:
Timestamp:
Jul 21, 2016, 2:07:01 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
ccb447e
Parents:
b81adcc4
Message:

reorganize global init so that it is simpler and generates less unnecessary code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    rb81adcc4 r6cf27a07  
    1818#include <iterator>
    1919#include <algorithm>
     20#include "InitTweak.h"
    2021#include "FixInit.h"
    21 #include "InitTweak.h"
     22#include "FixGlobalInit.h"
    2223#include "ResolvExpr/Resolver.h"
    2324#include "ResolvExpr/typeops.h"
     
    8384                };
    8485
     86                // debug
    8587                struct printSet {
    8688                        typedef ObjDeclCollector::ObjectSet ObjectSet;
     
    171173        } // namespace
    172174
    173         void fix( std::list< Declaration * > & translationUnit ) {
     175        void fix( std::list< Declaration * > & translationUnit, const std::string & filename, bool inLibrary ) {
     176                // fixes ConstructorInit for global variables. should happen before fixInitializers.
     177                InitTweak::fixGlobalInit( translationUnit, filename, inLibrary );
     178
    174179                InsertImplicitCalls::insert( translationUnit );
    175180                ResolveCopyCtors::resolveImplicitCalls( translationUnit );
Note: See TracChangeset for help on using the changeset viewer.