source: src/InitTweak/FixGlobalInit.h @ 711eee5

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglergc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 711eee5 was 711eee5, checked in by Rob Schluntz <rschlunt@…>, 6 years ago

generate global init function for each translation unit

  • Property mode set to 100644
File size: 1.1 KB
Line 
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// FixGlobalInit.h --
8//
9// Author           : Rob Schluntz
10// Created On       : Mon May 04 15:14:56 2016
11// Last Modified By : Rob Schluntz
12// Last Modified On : Wed May 04 16:35:37 2016
13// Update Count     : 2
14//
15
16#ifndef FIX_GLOBAL_INIT_H
17#define FIX_GLOBAL_INIT_H
18
19#include <string>
20#include <list>
21
22#include "SynTree/SynTree.h"
23#include "SynTree/Declaration.h"
24
25namespace InitTweak {
26  /// Moves global initialization into an _init function that is unique to the translation unit
27  void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name );
28
29  /// Apply transformations to a file name to get a valid C identifier which will be used as
30  /// the name of the generated initializer function.
31  std::string initName( const std::string & name );
32} // namespace
33
34#endif // GENPOLY_POLYMUTATOR_H
35
36// Local Variables: //
37// tab-width: 4 //
38// mode: c++ //
39// compile-command: "make install" //
40// End: //
Note: See TracBrowser for help on using the repository browser.