Index: src/CodeGen/CodeGenerator.cpp
===================================================================
--- src/CodeGen/CodeGenerator.cpp	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ src/CodeGen/CodeGenerator.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -17,8 +17,8 @@
 
 #include "AST/Print.hpp"
-#include "OperatorTable.h"           // for OperatorInfo, operatorLookup
-#include "CodeGen/GenType.h"         // for genType
+#include "OperatorTable.hpp"         // for OperatorInfo, operatorLookup
+#include "CodeGen/GenType.hpp"       // for genType
 #include "Common/ToString.hpp"       // for toString
-#include "Common/UniqueName.h"       // for UniqueName
+#include "Common/UniqueName.hpp"     // for UniqueName
 
 namespace CodeGen {
Index: src/CodeGen/CodeGenerator.hpp
===================================================================
--- src/CodeGen/CodeGenerator.hpp	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ src/CodeGen/CodeGenerator.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -20,6 +20,6 @@
 #include "AST/Fwd.hpp"
 #include "AST/Pass.hpp"          // for WithGuards, WithShortCircuiting, ...
-#include "CodeGen/Options.h"     // for Options
-#include "Common/Indenter.h"     // for Indenter
+#include "CodeGen/Options.hpp"   // for Options
+#include "Common/Indenter.hpp"   // for Indenter
 
 
Index: src/CodeGen/FixMain.cc
===================================================================
--- src/CodeGen/FixMain.cc	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,162 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// FixMain.cc -- Tools to change a Cforall main into a C main.
-//
-// Author           : Thierry Delisle
-// Created On       : Thr Jan 12 14:11:09 2017
-// Last Modified By :
-// Last Modified On :
-// Update Count     : 1
-//
-
-#include "FixMain.h"
-
-#include <cassert>                 // for assert, assertf
-#include <fstream>                 // for operator<<, basic_ostream::operator<<
-#include <list>                    // for list
-#include <string>                  // for operator<<
-
-#include "AST/Decl.hpp"
-#include "AST/Pass.hpp"
-#include "AST/Type.hpp"
-#include "AST/Vector.hpp"
-#include "Common/SemanticError.h"  // for SemanticError
-#include "CodeGen/GenType.h"       // for GenType
-#include "SymTab/Mangler.h"
-
-namespace CodeGen {
-
-namespace {
-
-struct FindMainCore final {
-	ast::FunctionDecl const * main_declaration = nullptr;
-
-	void previsit( ast::FunctionDecl const * decl ) {
-		if ( isMain( decl ) ) {
-			if ( main_declaration ) {
-				SemanticError( decl, "Multiple definition of main routine" );
-			}
-			main_declaration = decl;
-		}
-	}
-};
-
-std::string genTypeAt( const ast::vector<ast::Type> & types, size_t at ) {
-	return genType( types[at], "", Options( false, false, false, false ) );
-}
-
-ast::ObjectDecl * makeIntObj(){
-	return new ast::ObjectDecl( CodeLocation(), "",
-		new ast::BasicType( ast::BasicKind::SignedInt ) );
-}
-
-ast::ObjectDecl * makeCharStarStarObj() {
-	return new ast::ObjectDecl( CodeLocation(), "",
-		new ast::PointerType(
-			new ast::PointerType(
-				new ast::BasicType( ast::BasicKind::Char ) ) ) );
-}
-
-std::string getMangledNameOfMain(
-		ast::vector<ast::DeclWithType> && params, ast::ArgumentFlag isVarArgs ) {
-	ast::ptr<ast::FunctionDecl> decl = new ast::FunctionDecl(
-		CodeLocation(),
-		"main",
-		ast::vector<ast::TypeDecl>(),
-		ast::vector<ast::DeclWithType>(),
-		std::move( params ),
-		{ makeIntObj() },
-		nullptr,
-		ast::Storage::Classes(),
-		ast::Linkage::Spec(),
-		ast::vector<ast::Attribute>(),
-		ast::Function::Specs(),
-		isVarArgs
-	);
-	return Mangle::mangle( decl.get() );
-}
-
-std::string getMangledNameOf0ParameterMain() {
-	return getMangledNameOfMain( {}, ast::VariableArgs );
-}
-
-std::string getMangledNameOf2ParameterMain() {
-	return getMangledNameOfMain( {
-		makeIntObj(),
-		makeCharStarStarObj(),
-	}, ast::FixedArgs );
-}
-
-bool is_main( const std::string & mangled_name ) {
-	// This breaks if you move it out of the function.
-	static const std::string mangled_mains[] = {
-		getMangledNameOf0ParameterMain(),
-		getMangledNameOf2ParameterMain(),
-		//getMangledNameOf3ParameterMain(),
-	};
-
-	for ( auto main_name : mangled_mains ) {
-		if ( main_name == mangled_name ) return true;
-	}
-	return false;
-}
-
-struct FixLinkageCore final {
-	ast::Linkage::Spec const spec;
-	FixLinkageCore( ast::Linkage::Spec spec ) : spec( spec ) {}
-
-	ast::FunctionDecl const * previsit( ast::FunctionDecl const * decl ) {
-		if ( decl->name != "main" ) return decl;
-		return ast::mutate_field( decl, &ast::FunctionDecl::linkage, spec );
-	}
-};
-
-} // namespace
-
-bool isMain( const ast::FunctionDecl * decl ) {
-	if ( std::string("main") != decl->name ) {
-		return false;
-	}
-	return is_main( Mangle::mangle( decl, Mangle::Type ) );
-}
-
-void fixMainLinkage( ast::TranslationUnit & translationUnit,
-		bool replace_main ) {
-	ast::Linkage::Spec const spec =
-		( replace_main ) ? ast::Linkage::Cforall : ast::Linkage::C;
-	ast::Pass<FixLinkageCore>::run( translationUnit, spec );
-}
-
-void fixMainInvoke( ast::TranslationUnit & translationUnit,
-		std::ostream &os, const char * bootloader_filename ) {
-
-	ast::Pass<FindMainCore> main_finder;
-	ast::accept_all( translationUnit, main_finder );
-	if ( nullptr == main_finder.core.main_declaration ) return;
-
-	ast::FunctionDecl * main_declaration =
-		ast::mutate( main_finder.core.main_declaration );
-
-	main_declaration->mangleName = Mangle::mangle( main_declaration );
-
-	os << "static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return ";
-	os << main_declaration->scopedMangleName() << "(";
-	const auto& params = main_declaration->type->params;
-	switch ( params.size() ) {
-		case 3: os << "(" << genTypeAt(params, 0) << ")argc, (" << genTypeAt(params, 1) << ")argv, (" << genTypeAt(params, 2) << ")envp"; break;
-		case 2: os << "(" << genTypeAt(params, 0) << ")argc, (" << genTypeAt(params, 1) << ")argv"; break;
-		case 0: break;
-		default : assert(false);
-	}
-	os << "); }\n";
-
-	std::ifstream bootloader( bootloader_filename, std::ios::in );
-	assertf( bootloader.is_open(), "cannot open bootloader.c\n" );
-	os << bootloader.rdbuf();
-}
-
-} // namespace CodeGen
Index: src/CodeGen/FixMain.cpp
===================================================================
--- src/CodeGen/FixMain.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/FixMain.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,162 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixMain.cpp -- Tools to change a Cforall main into a C main.
+//
+// Author           : Thierry Delisle
+// Created On       : Thr Jan 12 14:11:09 2017
+// Last Modified By :
+// Last Modified On :
+// Update Count     : 1
+//
+
+#include "FixMain.hpp"
+
+#include <cassert>                   // for assert, assertf
+#include <fstream>                   // for operator<<, basic_ostream::oper...
+#include <list>                      // for list
+#include <string>                    // for operator<<
+
+#include "AST/Decl.hpp"
+#include "AST/Pass.hpp"
+#include "AST/Type.hpp"
+#include "AST/Vector.hpp"
+#include "Common/SemanticError.hpp"  // for SemanticError
+#include "CodeGen/GenType.hpp"       // for GenType
+#include "SymTab/Mangler.hpp"
+
+namespace CodeGen {
+
+namespace {
+
+struct FindMainCore final {
+	ast::FunctionDecl const * main_declaration = nullptr;
+
+	void previsit( ast::FunctionDecl const * decl ) {
+		if ( isMain( decl ) ) {
+			if ( main_declaration ) {
+				SemanticError( decl, "Multiple definition of main routine" );
+			}
+			main_declaration = decl;
+		}
+	}
+};
+
+std::string genTypeAt( const ast::vector<ast::Type> & types, size_t at ) {
+	return genType( types[at], "", Options( false, false, false, false ) );
+}
+
+ast::ObjectDecl * makeIntObj(){
+	return new ast::ObjectDecl( CodeLocation(), "",
+		new ast::BasicType( ast::BasicKind::SignedInt ) );
+}
+
+ast::ObjectDecl * makeCharStarStarObj() {
+	return new ast::ObjectDecl( CodeLocation(), "",
+		new ast::PointerType(
+			new ast::PointerType(
+				new ast::BasicType( ast::BasicKind::Char ) ) ) );
+}
+
+std::string getMangledNameOfMain(
+		ast::vector<ast::DeclWithType> && params, ast::ArgumentFlag isVarArgs ) {
+	ast::ptr<ast::FunctionDecl> decl = new ast::FunctionDecl(
+		CodeLocation(),
+		"main",
+		ast::vector<ast::TypeDecl>(),
+		ast::vector<ast::DeclWithType>(),
+		std::move( params ),
+		{ makeIntObj() },
+		nullptr,
+		ast::Storage::Classes(),
+		ast::Linkage::Spec(),
+		ast::vector<ast::Attribute>(),
+		ast::Function::Specs(),
+		isVarArgs
+	);
+	return Mangle::mangle( decl.get() );
+}
+
+std::string getMangledNameOf0ParameterMain() {
+	return getMangledNameOfMain( {}, ast::VariableArgs );
+}
+
+std::string getMangledNameOf2ParameterMain() {
+	return getMangledNameOfMain( {
+		makeIntObj(),
+		makeCharStarStarObj(),
+	}, ast::FixedArgs );
+}
+
+bool is_main( const std::string & mangled_name ) {
+	// This breaks if you move it out of the function.
+	static const std::string mangled_mains[] = {
+		getMangledNameOf0ParameterMain(),
+		getMangledNameOf2ParameterMain(),
+		//getMangledNameOf3ParameterMain(),
+	};
+
+	for ( auto main_name : mangled_mains ) {
+		if ( main_name == mangled_name ) return true;
+	}
+	return false;
+}
+
+struct FixLinkageCore final {
+	ast::Linkage::Spec const spec;
+	FixLinkageCore( ast::Linkage::Spec spec ) : spec( spec ) {}
+
+	ast::FunctionDecl const * previsit( ast::FunctionDecl const * decl ) {
+		if ( decl->name != "main" ) return decl;
+		return ast::mutate_field( decl, &ast::FunctionDecl::linkage, spec );
+	}
+};
+
+} // namespace
+
+bool isMain( const ast::FunctionDecl * decl ) {
+	if ( std::string("main") != decl->name ) {
+		return false;
+	}
+	return is_main( Mangle::mangle( decl, Mangle::Type ) );
+}
+
+void fixMainLinkage( ast::TranslationUnit & translationUnit,
+		bool replace_main ) {
+	ast::Linkage::Spec const spec =
+		( replace_main ) ? ast::Linkage::Cforall : ast::Linkage::C;
+	ast::Pass<FixLinkageCore>::run( translationUnit, spec );
+}
+
+void fixMainInvoke( ast::TranslationUnit & translationUnit,
+		std::ostream &os, const char * bootloader_filename ) {
+
+	ast::Pass<FindMainCore> main_finder;
+	ast::accept_all( translationUnit, main_finder );
+	if ( nullptr == main_finder.core.main_declaration ) return;
+
+	ast::FunctionDecl * main_declaration =
+		ast::mutate( main_finder.core.main_declaration );
+
+	main_declaration->mangleName = Mangle::mangle( main_declaration );
+
+	os << "static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return ";
+	os << main_declaration->scopedMangleName() << "(";
+	const auto& params = main_declaration->type->params;
+	switch ( params.size() ) {
+		case 3: os << "(" << genTypeAt(params, 0) << ")argc, (" << genTypeAt(params, 1) << ")argv, (" << genTypeAt(params, 2) << ")envp"; break;
+		case 2: os << "(" << genTypeAt(params, 0) << ")argc, (" << genTypeAt(params, 1) << ")argv"; break;
+		case 0: break;
+		default : assert(false);
+	}
+	os << "); }\n";
+
+	std::ifstream bootloader( bootloader_filename, std::ios::in );
+	assertf( bootloader.is_open(), "cannot open bootloader.c\n" );
+	os << bootloader.rdbuf();
+}
+
+} // namespace CodeGen
Index: src/CodeGen/FixMain.h
===================================================================
--- src/CodeGen/FixMain.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,37 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// FixMain.h -- Tools to change a Cforall main into a C main.
-//
-// Author           : Thierry Delisle
-// Created On       : Thr Jan 12 14:11:09 2017
-// Last Modified By : Andrew Beach
-// Last Modified On : Fri Oct 29 16:20:00 2021
-// Update Count     : 8
-//
-
-#pragma once
-
-#include <iosfwd>
-
-namespace ast {
-	class FunctionDecl;
-	class TranslationUnit;
-}
-
-namespace CodeGen {
-
-/// Is this function a program main function?
-bool isMain( const ast::FunctionDecl * decl );
-
-/// Adjust the linkage of main functions.
-void fixMainLinkage( ast::TranslationUnit & transUnit, bool replaceMain );
-
-/// Add a wrapper around to run the Cforall main.
-void fixMainInvoke( ast::TranslationUnit & transUnit,
-		std::ostream & os, const char * bootloaderFilename );
-
-} // namespace CodeGen
Index: src/CodeGen/FixMain.hpp
===================================================================
--- src/CodeGen/FixMain.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/FixMain.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,37 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixMain.hpp -- Tools to change a Cforall main into a C main.
+//
+// Author           : Thierry Delisle
+// Created On       : Thr Jan 12 14:11:09 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Oct 29 16:20:00 2021
+// Update Count     : 8
+//
+
+#pragma once
+
+#include <iosfwd>
+
+namespace ast {
+	class FunctionDecl;
+	class TranslationUnit;
+}
+
+namespace CodeGen {
+
+/// Is this function a program main function?
+bool isMain( const ast::FunctionDecl * decl );
+
+/// Adjust the linkage of main functions.
+void fixMainLinkage( ast::TranslationUnit & transUnit, bool replaceMain );
+
+/// Add a wrapper around to run the Cforall main.
+void fixMainInvoke( ast::TranslationUnit & transUnit,
+		std::ostream & os, const char * bootloaderFilename );
+
+} // namespace CodeGen
Index: src/CodeGen/FixNames.cc
===================================================================
--- src/CodeGen/FixNames.cc	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,97 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// FixNames.cc -- Adjustments to typed declarations.
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Dec 14 16:16:51 2023
-// Update Count     : 25
-//
-
-#include "FixNames.h"
-
-#include <memory>                  // for unique_ptr
-#include <string>                  // for string, operator!=, operator==
-
-#include "AST/Chain.hpp"
-#include "AST/Expr.hpp"
-#include "AST/Pass.hpp"
-#include "Common/SemanticError.h"  // for SemanticError
-#include "FixMain.h"               // for FixMain
-#include "SymTab/Mangler.h"        // for Mangler
-#include "CompilationState.hpp"
-
-namespace CodeGen {
-
-namespace {
-
-/// Does work with the main function and scopeLevels.
-class FixNames final {
-	int scopeLevel = 1;
-
-	bool shouldSetScopeLevel( const ast::DeclWithType * dwt ) {
-		return !dwt->name.empty() && dwt->linkage.is_mangled
-			&& dwt->scopeLevel != scopeLevel;
-	}
-public:
-	const ast::ObjectDecl *postvisit( const ast::ObjectDecl *objectDecl ) {
-		if ( shouldSetScopeLevel( objectDecl ) ) {
-			return ast::mutate_field( objectDecl, &ast::ObjectDecl::scopeLevel, scopeLevel );
-		}
-		return objectDecl;
-	}
-
-	const ast::FunctionDecl *postvisit( const ast::FunctionDecl *functionDecl ) {
-		if ( isMain( functionDecl ) ) {
-			auto mutDecl = ast::mutate( functionDecl );
-
-			if ( shouldSetScopeLevel( mutDecl ) ) {
-				mutDecl->scopeLevel = scopeLevel;
-			}
-
-			int nargs = mutDecl->params.size();
-			if ( 0 != nargs && 2 != nargs && 3 != nargs ) {
-				SemanticError( functionDecl, "Main expected to have 0, 2 or 3 arguments" );
-			}
-			ast::chain_mutate( mutDecl->stmts )->kids.push_back(
-				new ast::ReturnStmt(
-					mutDecl->location,
-					ast::ConstantExpr::from_int( mutDecl->location, 0 )
-				)
-			);
-
-			return mutDecl;
-		} else if ( shouldSetScopeLevel( functionDecl ) ) {
-			return ast::mutate_field( functionDecl, &ast::FunctionDecl::scopeLevel, scopeLevel );
-		} else {
-			return functionDecl;
-		}
-	}
-
-	void previsit( const ast::CompoundStmt * ) {
-		scopeLevel += 1;
-	}
-
-	void postvisit( const ast::CompoundStmt * ) {
-		scopeLevel -= 1;
-	}
-};
-
-} // namespace
-
-void fixNames( ast::TranslationUnit & translationUnit ) {
-	ast::Pass<FixNames>::run( translationUnit );
-}
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/FixNames.cpp
===================================================================
--- src/CodeGen/FixNames.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/FixNames.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,97 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixNames.cpp -- Adjustments to typed declarations.
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Dec 14 16:16:51 2023
+// Update Count     : 25
+//
+
+#include "FixNames.hpp"
+
+#include <memory>                    // for unique_ptr
+#include <string>                    // for string, operator!=, operator==
+
+#include "AST/Chain.hpp"
+#include "AST/Expr.hpp"
+#include "AST/Pass.hpp"
+#include "Common/SemanticError.hpp"  // for SemanticError
+#include "FixMain.hpp"               // for FixMain
+#include "SymTab/Mangler.hpp"        // for Mangler
+#include "CompilationState.hpp"
+
+namespace CodeGen {
+
+namespace {
+
+/// Does work with the main function and scopeLevels.
+class FixNames final {
+	int scopeLevel = 1;
+
+	bool shouldSetScopeLevel( const ast::DeclWithType * dwt ) {
+		return !dwt->name.empty() && dwt->linkage.is_mangled
+			&& dwt->scopeLevel != scopeLevel;
+	}
+public:
+	const ast::ObjectDecl *postvisit( const ast::ObjectDecl *objectDecl ) {
+		if ( shouldSetScopeLevel( objectDecl ) ) {
+			return ast::mutate_field( objectDecl, &ast::ObjectDecl::scopeLevel, scopeLevel );
+		}
+		return objectDecl;
+	}
+
+	const ast::FunctionDecl *postvisit( const ast::FunctionDecl *functionDecl ) {
+		if ( isMain( functionDecl ) ) {
+			auto mutDecl = ast::mutate( functionDecl );
+
+			if ( shouldSetScopeLevel( mutDecl ) ) {
+				mutDecl->scopeLevel = scopeLevel;
+			}
+
+			int nargs = mutDecl->params.size();
+			if ( 0 != nargs && 2 != nargs && 3 != nargs ) {
+				SemanticError( functionDecl, "Main expected to have 0, 2 or 3 arguments" );
+			}
+			ast::chain_mutate( mutDecl->stmts )->kids.push_back(
+				new ast::ReturnStmt(
+					mutDecl->location,
+					ast::ConstantExpr::from_int( mutDecl->location, 0 )
+				)
+			);
+
+			return mutDecl;
+		} else if ( shouldSetScopeLevel( functionDecl ) ) {
+			return ast::mutate_field( functionDecl, &ast::FunctionDecl::scopeLevel, scopeLevel );
+		} else {
+			return functionDecl;
+		}
+	}
+
+	void previsit( const ast::CompoundStmt * ) {
+		scopeLevel += 1;
+	}
+
+	void postvisit( const ast::CompoundStmt * ) {
+		scopeLevel -= 1;
+	}
+};
+
+} // namespace
+
+void fixNames( ast::TranslationUnit & translationUnit ) {
+	ast::Pass<FixNames>::run( translationUnit );
+}
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/FixNames.h
===================================================================
--- src/CodeGen/FixNames.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// FixNames.h -- Adjustments to typed declarations.
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Tue Oct 26 13:47:00 2021
-// Update Count     : 4
-//
-
-#pragma once
-
-namespace ast {
-	class TranslationUnit;
-}
-
-namespace CodeGen {
-
-/// Sets scope levels and fills in main's default return.
-void fixNames( ast::TranslationUnit & translationUnit );
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/FixNames.hpp
===================================================================
--- src/CodeGen/FixNames.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/FixNames.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,33 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixNames.hpp -- Adjustments to typed declarations.
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue Oct 26 13:47:00 2021
+// Update Count     : 4
+//
+
+#pragma once
+
+namespace ast {
+	class TranslationUnit;
+}
+
+namespace CodeGen {
+
+/// Sets scope levels and fills in main's default return.
+void fixNames( ast::TranslationUnit & translationUnit );
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/GenType.cc
===================================================================
--- src/CodeGen/GenType.cc	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,364 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// GenType.cc --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Fri May 20 11:18:00 2022
-// Update Count     : 24
-//
-#include "GenType.h"
-
-#include <cassert>                // for assert, assertf
-#include <list>                   // for _List_iterator, _List_const_iterator
-#include <sstream>                // for operator<<, ostringstream, basic_os...
-
-#include "AST/Print.hpp"          // for print
-#include "AST/Vector.hpp"         // for vector
-#include "CodeGenerator.hpp"      // for CodeGenerator
-#include "Common/UniqueName.h"    // for UniqueName
-
-namespace CodeGen {
-
-namespace {
-
-struct GenType final :
-		public ast::WithShortCircuiting,
-		public ast::WithVisitorRef<GenType> {
-	std::string result;
-	GenType( const std::string &typeString, const Options &options );
-
-	void previsit( ast::Node const * );
-	void postvisit( ast::Node const * );
-
-	void postvisit( ast::FunctionType const * type );
-	void postvisit( ast::VoidType const * type );
-	void postvisit( ast::BasicType const * type );
-	void postvisit( ast::PointerType const * type );
-	void postvisit( ast::ArrayType const * type );
-	void postvisit( ast::ReferenceType const * type );
-	void postvisit( ast::StructInstType const * type );
-	void postvisit( ast::UnionInstType const * type );
-	void postvisit( ast::EnumInstType const * type );
-	void postvisit( ast::TypeInstType const * type );
-	void postvisit( ast::TupleType const * type );
-	void postvisit( ast::VarArgsType const * type );
-	void postvisit( ast::ZeroType const * type );
-	void postvisit( ast::OneType const * type );
-	void postvisit( ast::GlobalScopeType const * type );
-	void postvisit( ast::TraitInstType const * type );
-	void postvisit( ast::TypeofType const * type );
-	void postvisit( ast::VTableType const * type );
-	void postvisit( ast::QualifiedType const * type );
-
-private:
-	void handleQualifiers( ast::Type const *type );
-	std::string handleGeneric( ast::BaseInstType const * type );
-	void genArray( const ast::CV::Qualifiers &qualifiers, ast::Type const *base, ast::Expr const *dimension, bool isVarLen, bool isStatic );
-	std::string genParamList( const ast::vector<ast::Type> & );
-
-	Options options;
-};
-
-GenType::GenType( const std::string &typeString, const Options &options ) : result( typeString ), options( options ) {}
-
-void GenType::previsit( ast::Node const * ) {
-	// Turn off automatic recursion for all nodes, to allow each visitor to
-	// precisely control the order in which its children are visited.
-	visit_children = false;
-}
-
-void GenType::postvisit( ast::Node const * node ) {
-	std::stringstream ss;
-	ast::print( ss, node );
-	assertf( false, "Unhandled node reached in GenType: %s", ss.str().c_str() );
-}
-
-void GenType::postvisit( ast::VoidType const * type ) {
-	result = "void " + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::BasicType const * type ) {
-	ast::BasicKind kind = type->kind;
-	assert( 0 <= kind && kind < ast::BasicKind::NUMBER_OF_BASIC_TYPES );
-	result = std::string( ast::BasicType::typeNames[kind] ) + " " + result;
-	handleQualifiers( type );
-}
-
-void GenType::genArray( const ast::CV::Qualifiers & qualifiers, ast::Type const * base, ast::Expr const *dimension, bool isVarLen, bool isStatic ) {
-	std::ostringstream os;
-	if ( result != "" ) {
-		if ( result[ 0 ] == '*' ) {
-			os << "(" << result << ")";
-		} else {
-			os << result;
-		}
-	}
-	os << "[";
-	if ( isStatic ) {
-		os << "static ";
-	}
-	if ( qualifiers.is_const ) {
-		os << "const ";
-	}
-	if ( qualifiers.is_volatile ) {
-		os << "volatile ";
-	}
-	if ( qualifiers.is_restrict ) {
-		os << "__restrict ";
-	}
-	if ( qualifiers.is_atomic ) {
-		os << "_Atomic ";
-	}
-	if ( dimension != 0 ) {
-		ast::Pass<CodeGenerator>::read( dimension, os, options );
-	} else if ( isVarLen ) {
-		// no dimension expression on a VLA means it came in with the * token
-		os << "*";
-	}
-	os << "]";
-
-	result = os.str();
-
-	base->accept( *visitor );
-}
-
-void GenType::postvisit( ast::PointerType const * type ) {
-	if ( type->isStatic || type->isVarLen || type->dimension ) {
-		genArray( type->qualifiers, type->base, type->dimension, type->isVarLen, type->isStatic );
-	} else {
-		handleQualifiers( type );
-		if ( result[ 0 ] == '?' ) {
-			result = "* " + result;
-		} else {
-			result = "*" + result;
-		}
-		type->base->accept( *visitor );
-	}
-}
-
-void GenType::postvisit( ast::ArrayType const * type ) {
-	genArray( type->qualifiers, type->base, type->dimension, type->isVarLen, type->isStatic );
-}
-
-void GenType::postvisit( ast::ReferenceType const * type ) {
-	assertf( !options.genC, "Reference types should not reach code generation." );
-	handleQualifiers( type );
-	result = "&" + result;
-	type->base->accept( *visitor );
-}
-
-void GenType::postvisit( ast::FunctionType const * type ) {
-	std::ostringstream os;
-
-	if ( result != "" ) {
-		if ( result[ 0 ] == '*' ) {
-			os << "(" << result << ")";
-		} else {
-			os << result;
-		}
-	}
-
-	if ( type->params.empty() ) {
-		if ( type->isVarArgs ) {
-			os << "()";
-		} else {
-			os << "(void)";
-		}
-	} else {
-		os << "(" ;
-
-		os << genParamList( type->params );
-
-		if ( type->isVarArgs ) {
-			os << ", ...";
-		}
-		os << ")";
-	}
-
-	result = os.str();
-
-	if ( type->returns.size() == 0 ) {
-		result = "void " + result;
-	} else {
-		type->returns.front()->accept( *visitor );
-	}
-
-	// Add forall clause.
-	if( !type->forall.empty() && !options.genC ) {
-		//assertf( !options.genC, "FunctionDecl type parameters should not reach code generation." );
-		std::ostringstream os;
-		ast::Pass<CodeGenerator> cg( os, options );
-		os << "forall(";
-		cg.core.genCommaList( type->forall );
-		os << ")" << std::endl;
-		result = os.str() + result;
-	}
-}
-
-std::string GenType::handleGeneric( ast::BaseInstType const * type ) {
-	if ( !type->params.empty() ) {
-		std::ostringstream os;
-		ast::Pass<CodeGenerator> cg( os, options );
-		os << "(";
-		cg.core.genCommaList( type->params );
-		os << ") ";
-		return os.str();
-	}
-	return "";
-}
-
-void GenType::postvisit( ast::StructInstType const * type )  {
-	result = type->name + handleGeneric( type ) + " " + result;
-	if ( options.genC ) result = "struct " + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::UnionInstType const * type ) {
-	result = type->name + handleGeneric( type ) + " " + result;
-	if ( options.genC ) result = "union " + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::EnumInstType const * type ) {
-	// if ( type->base && type->base->base ) {
-	// 	result = genType( type->base->base, result, options );
-	// } else {
-		result = type->name + " " + result;
-		if ( options.genC ) {
-			result = "enum " + result;
-		}
-	// }
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::TypeInstType const * type ) {
-	assertf( !options.genC, "TypeInstType should not reach code generation." );
-	result = type->name + " " + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::TupleType const * type ) {
-	assertf( !options.genC, "TupleType should not reach code generation." );
-	unsigned int i = 0;
-	std::ostringstream os;
-	os << "[";
-	for ( ast::ptr<ast::Type> const & t : type->types ) {
-		i++;
-		os << genType( t, "", options ) << (i == type->size() ? "" : ", ");
-	}
-	os << "] ";
-	result = os.str() + result;
-}
-
-void GenType::postvisit( ast::VarArgsType const * type ) {
-	result = "__builtin_va_list " + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::ZeroType const * type ) {
-	// Ideally these wouldn't hit codegen at all, but should be safe to make them ints.
-	result = (options.pretty ? "zero_t " : "long int ") + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::OneType const * type ) {
-	// Ideally these wouldn't hit codegen at all, but should be safe to make them ints.
-	result = (options.pretty ? "one_t " : "long int ") + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::GlobalScopeType const * type ) {
-	assertf( !options.genC, "GlobalScopeType should not reach code generation." );
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::TraitInstType const * type ) {
-	assertf( !options.genC, "TraitInstType should not reach code generation." );
-	result = type->name + " " + result;
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::TypeofType const * type ) {
-	std::ostringstream os;
-	os << "typeof(";
-	ast::Pass<CodeGenerator>::read( type->expr.get(), os, options );
-	os << ") " << result;
-	result = os.str();
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::VTableType const * type ) {
-	assertf( !options.genC, "Virtual table types should not reach code generation." );
-	std::ostringstream os;
-	os << "vtable(" << genType( type->base, "", options ) << ") " << result;
-	result = os.str();
-	handleQualifiers( type );
-}
-
-void GenType::postvisit( ast::QualifiedType const * type ) {
-	assertf( !options.genC, "QualifiedType should not reach code generation." );
-	std::ostringstream os;
-	os << genType( type->parent, "", options ) << "." << genType( type->child, "", options ) << result;
-	result = os.str();
-	handleQualifiers( type );
-}
-
-void GenType::handleQualifiers( ast::Type const * type ) {
-	if ( type->is_const() ) {
-		result = "const " + result;
-	}
-	if ( type->is_volatile() ) {
-		result = "volatile " + result;
-	}
-	if ( type->is_restrict() ) {
-		result = "__restrict " + result;
-	}
-	if ( type->is_atomic() ) {
-		result = "_Atomic " + result;
-	}
-}
-
-std::string GenType::genParamList( const ast::vector<ast::Type> & range ) {
-	auto cur = range.begin();
-	auto end = range.end();
-	if ( cur == end ) return "";
-	std::ostringstream oss;
-	UniqueName param( "__param_" );
-	while ( true ) {
-		oss << genType( *cur++, options.genC ? param.newName() : "", options );
-		if ( cur == end ) break;
-		oss << ", ";
-	}
-	return oss.str();
-}
-
-} // namespace
-
-std::string genType( ast::Type const * type, const std::string & base, const Options & options ) {
-	std::ostringstream os;
-	if ( !type->attributes.empty() ) {
-		ast::Pass<CodeGenerator> cg( os, options );
-		cg.core.genAttributes( type->attributes );
-	}
-
-	return os.str() + ast::Pass<GenType>::read( type, base, options );
-}
-
-std::string genTypeNoAttr( ast::Type const * type, const std::string & base, const Options & options ) {
-	return ast::Pass<GenType>::read( type, base, options );
-}
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/GenType.cpp
===================================================================
--- src/CodeGen/GenType.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/GenType.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,365 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// GenType.cpp --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri May 20 11:18:00 2022
+// Update Count     : 24
+//
+
+#include "GenType.hpp"
+
+#include <cassert>                // for assert, assertf
+#include <list>                   // for _List_iterator, _List_const_iterator
+#include <sstream>                // for operator<<, ostringstream, basic_os...
+
+#include "AST/Print.hpp"          // for print
+#include "AST/Vector.hpp"         // for vector
+#include "CodeGenerator.hpp"      // for CodeGenerator
+#include "Common/UniqueName.hpp"  // for UniqueName
+
+namespace CodeGen {
+
+namespace {
+
+struct GenType final :
+		public ast::WithShortCircuiting,
+		public ast::WithVisitorRef<GenType> {
+	std::string result;
+	GenType( const std::string &typeString, const Options &options );
+
+	void previsit( ast::Node const * );
+	void postvisit( ast::Node const * );
+
+	void postvisit( ast::FunctionType const * type );
+	void postvisit( ast::VoidType const * type );
+	void postvisit( ast::BasicType const * type );
+	void postvisit( ast::PointerType const * type );
+	void postvisit( ast::ArrayType const * type );
+	void postvisit( ast::ReferenceType const * type );
+	void postvisit( ast::StructInstType const * type );
+	void postvisit( ast::UnionInstType const * type );
+	void postvisit( ast::EnumInstType const * type );
+	void postvisit( ast::TypeInstType const * type );
+	void postvisit( ast::TupleType const * type );
+	void postvisit( ast::VarArgsType const * type );
+	void postvisit( ast::ZeroType const * type );
+	void postvisit( ast::OneType const * type );
+	void postvisit( ast::GlobalScopeType const * type );
+	void postvisit( ast::TraitInstType const * type );
+	void postvisit( ast::TypeofType const * type );
+	void postvisit( ast::VTableType const * type );
+	void postvisit( ast::QualifiedType const * type );
+
+private:
+	void handleQualifiers( ast::Type const *type );
+	std::string handleGeneric( ast::BaseInstType const * type );
+	void genArray( const ast::CV::Qualifiers &qualifiers, ast::Type const *base, ast::Expr const *dimension, bool isVarLen, bool isStatic );
+	std::string genParamList( const ast::vector<ast::Type> & );
+
+	Options options;
+};
+
+GenType::GenType( const std::string &typeString, const Options &options ) : result( typeString ), options( options ) {}
+
+void GenType::previsit( ast::Node const * ) {
+	// Turn off automatic recursion for all nodes, to allow each visitor to
+	// precisely control the order in which its children are visited.
+	visit_children = false;
+}
+
+void GenType::postvisit( ast::Node const * node ) {
+	std::stringstream ss;
+	ast::print( ss, node );
+	assertf( false, "Unhandled node reached in GenType: %s", ss.str().c_str() );
+}
+
+void GenType::postvisit( ast::VoidType const * type ) {
+	result = "void " + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::BasicType const * type ) {
+	ast::BasicKind kind = type->kind;
+	assert( 0 <= kind && kind < ast::BasicKind::NUMBER_OF_BASIC_TYPES );
+	result = std::string( ast::BasicType::typeNames[kind] ) + " " + result;
+	handleQualifiers( type );
+}
+
+void GenType::genArray( const ast::CV::Qualifiers & qualifiers, ast::Type const * base, ast::Expr const *dimension, bool isVarLen, bool isStatic ) {
+	std::ostringstream os;
+	if ( result != "" ) {
+		if ( result[ 0 ] == '*' ) {
+			os << "(" << result << ")";
+		} else {
+			os << result;
+		}
+	}
+	os << "[";
+	if ( isStatic ) {
+		os << "static ";
+	}
+	if ( qualifiers.is_const ) {
+		os << "const ";
+	}
+	if ( qualifiers.is_volatile ) {
+		os << "volatile ";
+	}
+	if ( qualifiers.is_restrict ) {
+		os << "__restrict ";
+	}
+	if ( qualifiers.is_atomic ) {
+		os << "_Atomic ";
+	}
+	if ( dimension != 0 ) {
+		ast::Pass<CodeGenerator>::read( dimension, os, options );
+	} else if ( isVarLen ) {
+		// no dimension expression on a VLA means it came in with the * token
+		os << "*";
+	}
+	os << "]";
+
+	result = os.str();
+
+	base->accept( *visitor );
+}
+
+void GenType::postvisit( ast::PointerType const * type ) {
+	if ( type->isStatic || type->isVarLen || type->dimension ) {
+		genArray( type->qualifiers, type->base, type->dimension, type->isVarLen, type->isStatic );
+	} else {
+		handleQualifiers( type );
+		if ( result[ 0 ] == '?' ) {
+			result = "* " + result;
+		} else {
+			result = "*" + result;
+		}
+		type->base->accept( *visitor );
+	}
+}
+
+void GenType::postvisit( ast::ArrayType const * type ) {
+	genArray( type->qualifiers, type->base, type->dimension, type->isVarLen, type->isStatic );
+}
+
+void GenType::postvisit( ast::ReferenceType const * type ) {
+	assertf( !options.genC, "Reference types should not reach code generation." );
+	handleQualifiers( type );
+	result = "&" + result;
+	type->base->accept( *visitor );
+}
+
+void GenType::postvisit( ast::FunctionType const * type ) {
+	std::ostringstream os;
+
+	if ( result != "" ) {
+		if ( result[ 0 ] == '*' ) {
+			os << "(" << result << ")";
+		} else {
+			os << result;
+		}
+	}
+
+	if ( type->params.empty() ) {
+		if ( type->isVarArgs ) {
+			os << "()";
+		} else {
+			os << "(void)";
+		}
+	} else {
+		os << "(" ;
+
+		os << genParamList( type->params );
+
+		if ( type->isVarArgs ) {
+			os << ", ...";
+		}
+		os << ")";
+	}
+
+	result = os.str();
+
+	if ( type->returns.size() == 0 ) {
+		result = "void " + result;
+	} else {
+		type->returns.front()->accept( *visitor );
+	}
+
+	// Add forall clause.
+	if( !type->forall.empty() && !options.genC ) {
+		//assertf( !options.genC, "FunctionDecl type parameters should not reach code generation." );
+		std::ostringstream os;
+		ast::Pass<CodeGenerator> cg( os, options );
+		os << "forall(";
+		cg.core.genCommaList( type->forall );
+		os << ")" << std::endl;
+		result = os.str() + result;
+	}
+}
+
+std::string GenType::handleGeneric( ast::BaseInstType const * type ) {
+	if ( !type->params.empty() ) {
+		std::ostringstream os;
+		ast::Pass<CodeGenerator> cg( os, options );
+		os << "(";
+		cg.core.genCommaList( type->params );
+		os << ") ";
+		return os.str();
+	}
+	return "";
+}
+
+void GenType::postvisit( ast::StructInstType const * type )  {
+	result = type->name + handleGeneric( type ) + " " + result;
+	if ( options.genC ) result = "struct " + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::UnionInstType const * type ) {
+	result = type->name + handleGeneric( type ) + " " + result;
+	if ( options.genC ) result = "union " + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::EnumInstType const * type ) {
+	// if ( type->base && type->base->base ) {
+	// 	result = genType( type->base->base, result, options );
+	// } else {
+		result = type->name + " " + result;
+		if ( options.genC ) {
+			result = "enum " + result;
+		}
+	// }
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::TypeInstType const * type ) {
+	assertf( !options.genC, "TypeInstType should not reach code generation." );
+	result = type->name + " " + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::TupleType const * type ) {
+	assertf( !options.genC, "TupleType should not reach code generation." );
+	unsigned int i = 0;
+	std::ostringstream os;
+	os << "[";
+	for ( ast::ptr<ast::Type> const & t : type->types ) {
+		i++;
+		os << genType( t, "", options ) << (i == type->size() ? "" : ", ");
+	}
+	os << "] ";
+	result = os.str() + result;
+}
+
+void GenType::postvisit( ast::VarArgsType const * type ) {
+	result = "__builtin_va_list " + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::ZeroType const * type ) {
+	// Ideally these wouldn't hit codegen at all, but should be safe to make them ints.
+	result = (options.pretty ? "zero_t " : "long int ") + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::OneType const * type ) {
+	// Ideally these wouldn't hit codegen at all, but should be safe to make them ints.
+	result = (options.pretty ? "one_t " : "long int ") + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::GlobalScopeType const * type ) {
+	assertf( !options.genC, "GlobalScopeType should not reach code generation." );
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::TraitInstType const * type ) {
+	assertf( !options.genC, "TraitInstType should not reach code generation." );
+	result = type->name + " " + result;
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::TypeofType const * type ) {
+	std::ostringstream os;
+	os << "typeof(";
+	ast::Pass<CodeGenerator>::read( type->expr.get(), os, options );
+	os << ") " << result;
+	result = os.str();
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::VTableType const * type ) {
+	assertf( !options.genC, "Virtual table types should not reach code generation." );
+	std::ostringstream os;
+	os << "vtable(" << genType( type->base, "", options ) << ") " << result;
+	result = os.str();
+	handleQualifiers( type );
+}
+
+void GenType::postvisit( ast::QualifiedType const * type ) {
+	assertf( !options.genC, "QualifiedType should not reach code generation." );
+	std::ostringstream os;
+	os << genType( type->parent, "", options ) << "." << genType( type->child, "", options ) << result;
+	result = os.str();
+	handleQualifiers( type );
+}
+
+void GenType::handleQualifiers( ast::Type const * type ) {
+	if ( type->is_const() ) {
+		result = "const " + result;
+	}
+	if ( type->is_volatile() ) {
+		result = "volatile " + result;
+	}
+	if ( type->is_restrict() ) {
+		result = "__restrict " + result;
+	}
+	if ( type->is_atomic() ) {
+		result = "_Atomic " + result;
+	}
+}
+
+std::string GenType::genParamList( const ast::vector<ast::Type> & range ) {
+	auto cur = range.begin();
+	auto end = range.end();
+	if ( cur == end ) return "";
+	std::ostringstream oss;
+	UniqueName param( "__param_" );
+	while ( true ) {
+		oss << genType( *cur++, options.genC ? param.newName() : "", options );
+		if ( cur == end ) break;
+		oss << ", ";
+	}
+	return oss.str();
+}
+
+} // namespace
+
+std::string genType( ast::Type const * type, const std::string & base, const Options & options ) {
+	std::ostringstream os;
+	if ( !type->attributes.empty() ) {
+		ast::Pass<CodeGenerator> cg( os, options );
+		cg.core.genAttributes( type->attributes );
+	}
+
+	return os.str() + ast::Pass<GenType>::read( type, base, options );
+}
+
+std::string genTypeNoAttr( ast::Type const * type, const std::string & base, const Options & options ) {
+	return ast::Pass<GenType>::read( type, base, options );
+}
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/GenType.h
===================================================================
--- src/CodeGen/GenType.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,37 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// GenType.h --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Feb 16 04:11:40 2020
-// Update Count     : 5
-//
-
-#pragma once
-
-#include <string>  // for string
-
-#include "CodeGen/Options.h" // for Options
-
-namespace ast {
-	class Type;
-}
-
-namespace CodeGen {
-
-std::string genType( ast::Type const * type, const std::string & base, const Options & options );
-std::string genTypeNoAttr( ast::Type const * type, const std::string & base, const Options & options );
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/GenType.hpp
===================================================================
--- src/CodeGen/GenType.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/GenType.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,37 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// GenType.hpp --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sun Feb 16 04:11:40 2020
+// Update Count     : 5
+//
+
+#pragma once
+
+#include <string>  // for string
+
+#include "CodeGen/Options.hpp" // for Options
+
+namespace ast {
+	class Type;
+}
+
+namespace CodeGen {
+
+std::string genType( ast::Type const * type, const std::string & base, const Options & options );
+std::string genTypeNoAttr( ast::Type const * type, const std::string & base, const Options & options );
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/Generate.cc
===================================================================
--- src/CodeGen/Generate.cc	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,75 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// Generate.cc --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Feb 16 03:01:51 2020
-// Update Count     : 9
-//
-#include "Generate.h"
-
-#include <iostream>                  // for ostream, endl, operator<<
-#include <list>                      // for list
-#include <string>                    // for operator<<
-
-#include "CodeGenerator.hpp"         // for CodeGenerator, doSemicolon, ...
-#include "GenType.h"                 // for genPrettyType
-
-using namespace std;
-
-namespace CodeGen {
-
-namespace {
-	bool shouldClean( ast::Decl const * decl ) {
-		return dynamic_cast<ast::TraitDecl const *>( decl );
-	}
-
-	/// Removes various nodes that should not exist in CodeGen.
-	struct TreeCleaner final {
-		ast::CompoundStmt const * previsit( ast::CompoundStmt const * stmt ) {
-			auto mutStmt = ast::mutate( stmt );
-			erase_if( mutStmt->kids, []( ast::Stmt const * stmt ){
-				auto declStmt = dynamic_cast<ast::DeclStmt const *>( stmt );
-				return ( declStmt ) ? shouldClean( declStmt->decl ) : false;
-			} );
-			return mutStmt;
-		}
-
-		ast::Stmt const * postvisit( ast::ImplicitCtorDtorStmt const * stmt ) {
-			return stmt->callStmt;
-		}
-	};
-} // namespace
-
-void generate( ast::TranslationUnit & translationUnit, std::ostream & os, bool doIntrinsics,
-		bool pretty, bool generateC, bool lineMarks, bool printExprTypes ) {
-	erase_if( translationUnit.decls, shouldClean );
-	ast::Pass<TreeCleaner>::run( translationUnit );
-
-	ast::Pass<CodeGenerator> cgv( os,
-			Options( pretty, generateC, lineMarks, printExprTypes ) );
-	for ( auto & decl : translationUnit.decls ) {
-		if ( decl->linkage.is_generatable && (doIntrinsics || !decl->linkage.is_builtin ) ) {
-			cgv.core.updateLocation( decl );
-			decl->accept( cgv );
-			if ( doSemicolon( decl ) ) {
-				os << ";";
-			}
-			os << cgv.core.endl;
-		}
-	}
-}
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/Generate.cpp
===================================================================
--- src/CodeGen/Generate.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/Generate.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,75 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Generate.cpp --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sun Feb 16 03:01:51 2020
+// Update Count     : 9
+//
+#include "Generate.hpp"
+
+#include <iostream>                  // for ostream, endl, operator<<
+#include <list>                      // for list
+#include <string>                    // for operator<<
+
+#include "CodeGenerator.hpp"         // for CodeGenerator, doSemicolon, ...
+#include "GenType.hpp"               // for genPrettyType
+
+using namespace std;
+
+namespace CodeGen {
+
+namespace {
+	bool shouldClean( ast::Decl const * decl ) {
+		return dynamic_cast<ast::TraitDecl const *>( decl );
+	}
+
+	/// Removes various nodes that should not exist in CodeGen.
+	struct TreeCleaner final {
+		ast::CompoundStmt const * previsit( ast::CompoundStmt const * stmt ) {
+			auto mutStmt = ast::mutate( stmt );
+			erase_if( mutStmt->kids, []( ast::Stmt const * stmt ){
+				auto declStmt = dynamic_cast<ast::DeclStmt const *>( stmt );
+				return ( declStmt ) ? shouldClean( declStmt->decl ) : false;
+			} );
+			return mutStmt;
+		}
+
+		ast::Stmt const * postvisit( ast::ImplicitCtorDtorStmt const * stmt ) {
+			return stmt->callStmt;
+		}
+	};
+} // namespace
+
+void generate( ast::TranslationUnit & translationUnit, std::ostream & os, bool doIntrinsics,
+		bool pretty, bool generateC, bool lineMarks, bool printExprTypes ) {
+	erase_if( translationUnit.decls, shouldClean );
+	ast::Pass<TreeCleaner>::run( translationUnit );
+
+	ast::Pass<CodeGenerator> cgv( os,
+			Options( pretty, generateC, lineMarks, printExprTypes ) );
+	for ( auto & decl : translationUnit.decls ) {
+		if ( decl->linkage.is_generatable && (doIntrinsics || !decl->linkage.is_builtin ) ) {
+			cgv.core.updateLocation( decl );
+			decl->accept( cgv );
+			if ( doSemicolon( decl ) ) {
+				os << ";";
+			}
+			os << cgv.core.endl;
+		}
+	}
+}
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/Generate.h
===================================================================
--- src/CodeGen/Generate.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,41 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// Generate.h --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 21 22:16:35 2017
-// Update Count     : 2
-//
-
-#pragma once
-
-#include <iostream>  // for ostream
-
-namespace ast {
-	class TranslationUnit;
-}
-
-namespace CodeGen {
-
-/// Generates all code in transUnit and writing it to the os.
-/// doIntrinsics: Should intrinsic functions be printed?
-/// pretty: Format output nicely (e.g., uses unmangled names, etc.).
-/// generateC: Make sure the output only consists of C code (allows some assertions, etc.)
-/// lineMarks: Output line marks (processed line directives) in the output.
-/// printExprTypes: Print the types of expressions in comments.
-void generate( ast::TranslationUnit & transUnit, std::ostream &os, bool doIntrinsics,
-		bool pretty, bool generateC, bool lineMarks, bool printExprTypes );
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/Generate.hpp
===================================================================
--- src/CodeGen/Generate.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/Generate.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,41 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Generate.hpp --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Jul 21 22:16:35 2017
+// Update Count     : 2
+//
+
+#pragma once
+
+#include <iostream>  // for ostream
+
+namespace ast {
+	class TranslationUnit;
+}
+
+namespace CodeGen {
+
+/// Generates all code in transUnit and writing it to the os.
+/// doIntrinsics: Should intrinsic functions be printed?
+/// pretty: Format output nicely (e.g., uses unmangled names, etc.).
+/// generateC: Make sure the output only consists of C code (allows some assertions, etc.)
+/// lineMarks: Output line marks (processed line directives) in the output.
+/// printExprTypes: Print the types of expressions in comments.
+void generate( ast::TranslationUnit & transUnit, std::ostream &os, bool doIntrinsics,
+		bool pretty, bool generateC, bool lineMarks, bool printExprTypes );
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/LinkOnce.cc
===================================================================
--- src/CodeGen/LinkOnce.cc	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,86 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// LinkOnce.cc -- Translate the cfa_linkonce attribute.
-//
-// Author           : Andrew Beach
-// Created On       : Thur May 13 10:10:00 2021
-// Last Modified By : Andrew Beach
-// Last Modified On : Wed Oct  4 10:52:00 2023
-// Update Count     : 1
-//
-
-#include "LinkOnce.h"
-
-#include <algorithm>
-
-#include "AST/Attribute.hpp"
-#include "AST/Decl.hpp"
-#include "AST/Expr.hpp"
-#include "AST/Pass.hpp"
-
-namespace CodeGen {
-
-namespace {
-
-bool is_cfa_linkonce( ast::Attribute const * attr ) {
-	return "cfa_linkonce" == attr->name;
-}
-
-bool is_section_attribute( ast::Attribute const * attr ) {
-	return "section" == attr->name;
-}
-
-struct LinkOnceCore : public ast::WithShortCircuiting {
-	void previsit( ast::Decl const * ) {
-		visit_children = false;
-	}
-
-	ast::DeclWithType const * postvisit( ast::DeclWithType const * decl ) {
-		// Check to see if we have to mutate, because should be uncommon.
-		{
-			auto & attributes = decl->attributes;
-			auto found = std::find_if( attributes.begin(), attributes.end(),
-					is_cfa_linkonce );
-			if ( attributes.end() == found ) return decl;
-		}
-		auto mutDecl = mutate( decl );
-		auto & attributes = mutDecl->attributes;
-
-		// Remove all conflicting section attributes.
-		erase_if( attributes, is_section_attribute );
-
-		// Get the attribute, and overwrite it as a section attribute.
-		auto found = std::find_if( attributes.begin(), attributes.end(),
-				is_cfa_linkonce );
-		assert( attributes.end() != found );
-		ast::Attribute * attribute = found->get_and_mutate();
-		assert( attribute->params.empty() );
-		assert( !decl->mangleName.empty() );
-
-		attribute->name = "section";
-		attribute->params.push_back(
-			ast::ConstantExpr::from_string( mutDecl->location,
-				".gnu.linkonce." + decl->mangleName
-			)
-		);
-
-		// Unconditionnaly add "visibility(default)" to anything with
-		// .gnu.linkonce visibility is a mess otherwise.
-		attributes.push_back( new ast::Attribute( "visibility", {
-			ast::ConstantExpr::from_string( mutDecl->location, "default" )
-		} ) );
-		return mutDecl;
-	}
-};
-
-} // namespace
-
-void translateLinkOnce( ast::TranslationUnit & translationUnit ) {
-	ast::Pass<LinkOnceCore>::run( translationUnit );
-}
-
-} // namespace CodeGen
Index: src/CodeGen/LinkOnce.cpp
===================================================================
--- src/CodeGen/LinkOnce.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/LinkOnce.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,86 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// LinkOnce.cpp -- Translate the cfa_linkonce attribute.
+//
+// Author           : Andrew Beach
+// Created On       : Thur May 13 10:10:00 2021
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Oct  4 10:52:00 2023
+// Update Count     : 1
+//
+
+#include "LinkOnce.hpp"
+
+#include <algorithm>
+
+#include "AST/Attribute.hpp"
+#include "AST/Decl.hpp"
+#include "AST/Expr.hpp"
+#include "AST/Pass.hpp"
+
+namespace CodeGen {
+
+namespace {
+
+bool is_cfa_linkonce( ast::Attribute const * attr ) {
+	return "cfa_linkonce" == attr->name;
+}
+
+bool is_section_attribute( ast::Attribute const * attr ) {
+	return "section" == attr->name;
+}
+
+struct LinkOnceCore : public ast::WithShortCircuiting {
+	void previsit( ast::Decl const * ) {
+		visit_children = false;
+	}
+
+	ast::DeclWithType const * postvisit( ast::DeclWithType const * decl ) {
+		// Check to see if we have to mutate, because should be uncommon.
+		{
+			auto & attributes = decl->attributes;
+			auto found = std::find_if( attributes.begin(), attributes.end(),
+					is_cfa_linkonce );
+			if ( attributes.end() == found ) return decl;
+		}
+		auto mutDecl = mutate( decl );
+		auto & attributes = mutDecl->attributes;
+
+		// Remove all conflicting section attributes.
+		erase_if( attributes, is_section_attribute );
+
+		// Get the attribute, and overwrite it as a section attribute.
+		auto found = std::find_if( attributes.begin(), attributes.end(),
+				is_cfa_linkonce );
+		assert( attributes.end() != found );
+		ast::Attribute * attribute = found->get_and_mutate();
+		assert( attribute->params.empty() );
+		assert( !decl->mangleName.empty() );
+
+		attribute->name = "section";
+		attribute->params.push_back(
+			ast::ConstantExpr::from_string( mutDecl->location,
+				".gnu.linkonce." + decl->mangleName
+			)
+		);
+
+		// Unconditionnaly add "visibility(default)" to anything with
+		// .gnu.linkonce visibility is a mess otherwise.
+		attributes.push_back( new ast::Attribute( "visibility", {
+			ast::ConstantExpr::from_string( mutDecl->location, "default" )
+		} ) );
+		return mutDecl;
+	}
+};
+
+} // namespace
+
+void translateLinkOnce( ast::TranslationUnit & translationUnit ) {
+	ast::Pass<LinkOnceCore>::run( translationUnit );
+}
+
+} // namespace CodeGen
Index: src/CodeGen/LinkOnce.h
===================================================================
--- src/CodeGen/LinkOnce.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,35 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// LinkOnce.h -- Translate the cfa_linkonce attribute.
-//
-// Author           : Andrew Beach
-// Created On       : Thur May 13 10:06:00 2021
-// Last Modified By : Andrew Beach
-// Last Modified On : Wed Oct  4 10:52:00 2023
-// Update Count     : 1
-//
-
-#pragma once
-
-// This could either be an early step in code-generation or a step of the
-// Cforall to C lowering. It could also be part of attribute handling but
-// for now its almost the only attribute we handle.
-
-
-namespace ast {
-	class TranslationUnit;
-}
-
-namespace CodeGen {
-
-void translateLinkOnce( ast::TranslationUnit & translationUnit );
-/* Convert the cfa_linkonce attribute on top level declaration into
- * a special section declaration (.gnu.linkonce) so that it may be defined
- * multiple times (same name and same type, must have the same value).
- */
-
-}
Index: src/CodeGen/LinkOnce.hpp
===================================================================
--- src/CodeGen/LinkOnce.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/LinkOnce.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,35 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// LinkOnce.hpp -- Translate the cfa_linkonce attribute.
+//
+// Author           : Andrew Beach
+// Created On       : Thur May 13 10:06:00 2021
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Oct  4 10:52:00 2023
+// Update Count     : 1
+//
+
+#pragma once
+
+// This could either be an early step in code-generation or a step of the
+// Cforall to C lowering. It could also be part of attribute handling but
+// for now its almost the only attribute we handle.
+
+
+namespace ast {
+	class TranslationUnit;
+}
+
+namespace CodeGen {
+
+void translateLinkOnce( ast::TranslationUnit & translationUnit );
+/* Convert the cfa_linkonce attribute on top level declaration into
+ * a special section declaration (.gnu.linkonce) so that it may be defined
+ * multiple times (same name and same type, must have the same value).
+ */
+
+}
Index: src/CodeGen/OperatorTable.cc
===================================================================
--- src/CodeGen/OperatorTable.cc	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,140 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// OperatorTable.cc --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Fri Nov  3 16:00:00 2023
-// Update Count     : 56
-//
-
-#include "OperatorTable.h"
-
-#include <cassert>         // for assert
-#include <unordered_map>   // for unordered_map
-
-namespace CodeGen {
-
-static const OperatorInfo tableValues[] = {
-	//  inputName symbol  outputName                     friendlyName                  type
-	{	"?[?]",   "",     "_operator_index",             "Index",                      OT_INDEX          },
-	{	"?{}",    "=",    "_constructor",                "Constructor",                OT_CTOR           },
-	{	"^?{}",   "",     "_destructor",                 "Destructor",                 OT_DTOR           },
-	{	"?()",    "",     "_operator_call",              "Call Operator",              OT_CALL           },
-	{	"?++",    "++",   "_operator_postincr",          "Postfix Increment",          OT_POSTFIXASSIGN  },
-	{	"?--",    "--",   "_operator_postdecr",          "Postfix Decrement",          OT_POSTFIXASSIGN  },
-	{	"*?",     "*",    "_operator_deref",             "Dereference",                OT_PREFIX         },
-	{	"+?",     "+",    "_operator_unaryplus",         "Plus",                       OT_PREFIX         },
-	{	"-?",     "-",    "_operator_unaryminus",        "Minus",                      OT_PREFIX         },
-	{	"~?",     "~",    "_operator_bitnot",            "Bitwise Not",                OT_PREFIX         },
-	{	"!?",     "!",    "_operator_lognot",            "Logical Not",                OT_PREFIX         },
-	{	"++?",    "++",   "_operator_preincr",           "Prefix Increment",           OT_PREFIXASSIGN   },
-	{	"--?",    "--",   "_operator_predecr",           "Prefix Decrement",           OT_PREFIXASSIGN   },
-	{	"?\\?",   "\\",   "_operator_exponential",       "Exponentiation",             OT_INFIX          },
-	{	"?*?",    "*",    "_operator_multiply",          "Multiplication",             OT_INFIX          },
-	{	"?/?",    "/",    "_operator_divide",            "Division",                   OT_INFIX          },
-	{	"?%?",    "%",    "_operator_modulus",           "Modulo",                     OT_INFIX          },
-	{	"?+?",    "+",    "_operator_add",               "Addition",                   OT_INFIX          },
-	{	"?-?",    "-",    "_operator_subtract",          "Substraction",               OT_INFIX          },
-	{	"?<<?",   "<<",   "_operator_shiftleft",         "Shift Left",                 OT_INFIX          },
-	{	"?>>?",   ">>",   "_operator_shiftright",        "Shift Right",                OT_INFIX          },
-	{	"?<?",    "<",    "_operator_less",              "Less-than",                  OT_INFIX          },
-	{	"?>?",    ">",    "_operator_greater",           "Greater-than",               OT_INFIX          },
-	{	"?<=?",   "<=",   "_operator_lessequal",         "Less-than-or-Equal",         OT_INFIX          },
-	{	"?>=?",   ">=",   "_operator_greaterequal",      "Greater-than-or-Equal",      OT_INFIX          },
-	{	"?==?",   "==",   "_operator_equal",             "Equality",                   OT_INFIX          },
-	{	"?!=?",   "!=",   "_operator_notequal",          "Not-Equal",                  OT_INFIX          },
-	{	"?&?",    "&",    "_operator_bitand",            "Bitwise And",                OT_INFIX          },
-	{	"?^?",    "^",    "_operator_bitxor",            "Bitwise Xor",                OT_INFIX          },
-	{	"?|?",    "|",    "_operator_bitor",             "Bitwise Or",                 OT_INFIX          },
-	{	"?=?",    "=",    "_operator_assign",            "Assignment",                 OT_INFIXASSIGN    },
-	{	"?\\=?",  "\\=",  "_operator_expassign",         "Exponentiation Assignment",  OT_INFIXASSIGN    },
-	{	"?*=?",   "*=",   "_operator_multassign",        "Multiplication Assignment",  OT_INFIXASSIGN    },
-	{	"?/=?",   "/=",   "_operator_divassign",         "Division Assignment",        OT_INFIXASSIGN    },
-	{	"?%=?",   "%=",   "_operator_modassign",         "Modulo Assignment",          OT_INFIXASSIGN    },
-	{	"?+=?",   "+=",   "_operator_addassign",         "Addition Assignment",        OT_INFIXASSIGN    },
-	{	"?-=?",   "-=",   "_operator_subassign",         "Substrction Assignment",     OT_INFIXASSIGN    },
-	{	"?<<=?",  "<<=",  "_operator_shiftleftassign",   "Shift Left Assignment",      OT_INFIXASSIGN    },
-	{	"?>>=?",  ">>=",  "_operator_shiftrightassign",  "Shift Right Assignment",     OT_INFIXASSIGN    },
-	{	"?&=?",   "&=",   "_operator_bitandassign",      "Bitwise And Assignment",     OT_INFIXASSIGN    },
-	{	"?^=?",   "^=",   "_operator_bitxorassign",      "Bitwise Xor Assignment",     OT_INFIXASSIGN    },
-	{	"?|=?",   "|=",   "_operator_bitorassign",       "Bitwise Or Assignment",      OT_INFIXASSIGN    },
-}; // tableValues
-
-enum { numOps = sizeof( tableValues ) / sizeof( OperatorInfo ) };
-
-const OperatorInfo * operatorLookup( const std::string & inputName ) {
-	// Static information set up:
-	static std::unordered_map<std::string, const OperatorInfo *> inputTable;
-	if ( inputTable.empty() ) for ( const OperatorInfo & op : tableValues ) {
-		inputTable[ op.inputName ] = &op;
-	}
-
-	if ( inputName.find_first_of( "?^*+-!", 0, 1 ) == std::string::npos ) return nullptr; // prefilter
-	const OperatorInfo * ret = inputTable.find( inputName )->second;
-	// This can only happen if an invalid identifier name has been used.
-	assert( ret );
-	return ret;
-}
-
-bool isOperator( const std::string & inputName ) {
-	return operatorLookup( inputName ) != nullptr;
-}
-
-std::string operatorFriendlyName( const std::string & inputName ) {
-	const OperatorInfo * info = operatorLookup( inputName );
-	if ( info ) return info->friendlyName;
-	return "";
-}
-
-// This is only used in the demangler, so it is smaller (and only maybe slow).
-const OperatorInfo * operatorLookupByOutput( const std::string & outputName ) {
-	if ( '_' != outputName[0] ) return nullptr;
-	for ( const OperatorInfo & op : tableValues ) {
-		if ( outputName == op.outputName ) {
-			return &op;
-		}
-	}
-	return nullptr;
-}
-
-bool isConstructor( const std::string & inputName ) {
-	const OperatorInfo * info = operatorLookup( inputName );
-	if ( info ) return info->type == OT_CTOR;
-	return false;
-}
-
-bool isDestructor( const std::string & inputName ) {
-	const OperatorInfo * info = operatorLookup( inputName );
-	if ( info ) return info->type == OT_DTOR;
-	return false;
-}
-
-bool isCtorDtor( const std::string & inputName ) {
-	const OperatorInfo * info = operatorLookup( inputName );
-	if ( info ) return info->type <= OT_CONSTRUCTOR;
-	return false;
-}
-
-bool isAssignment( const std::string & inputName ) {
-	const OperatorInfo * info = operatorLookup( inputName );
-	if ( info ) return info->type > OT_CONSTRUCTOR && info->type <= OT_ASSIGNMENT;
-	return false;
-}
-
-bool isCtorDtorAssign( const std::string & inputName ) {
-	const OperatorInfo * info = operatorLookup( inputName );
-	if ( info ) return info->type <= OT_ASSIGNMENT;
-	return false;
-}
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: src/CodeGen/OperatorTable.cpp
===================================================================
--- src/CodeGen/OperatorTable.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/OperatorTable.cpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,140 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// OperatorTable.cpp --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Nov  3 16:00:00 2023
+// Update Count     : 56
+//
+
+#include "OperatorTable.hpp"
+
+#include <cassert>         // for assert
+#include <unordered_map>   // for unordered_map
+
+namespace CodeGen {
+
+static const OperatorInfo tableValues[] = {
+	//  inputName symbol  outputName                     friendlyName                  type
+	{	"?[?]",   "",     "_operator_index",             "Index",                      OT_INDEX          },
+	{	"?{}",    "=",    "_constructor",                "Constructor",                OT_CTOR           },
+	{	"^?{}",   "",     "_destructor",                 "Destructor",                 OT_DTOR           },
+	{	"?()",    "",     "_operator_call",              "Call Operator",              OT_CALL           },
+	{	"?++",    "++",   "_operator_postincr",          "Postfix Increment",          OT_POSTFIXASSIGN  },
+	{	"?--",    "--",   "_operator_postdecr",          "Postfix Decrement",          OT_POSTFIXASSIGN  },
+	{	"*?",     "*",    "_operator_deref",             "Dereference",                OT_PREFIX         },
+	{	"+?",     "+",    "_operator_unaryplus",         "Plus",                       OT_PREFIX         },
+	{	"-?",     "-",    "_operator_unaryminus",        "Minus",                      OT_PREFIX         },
+	{	"~?",     "~",    "_operator_bitnot",            "Bitwise Not",                OT_PREFIX         },
+	{	"!?",     "!",    "_operator_lognot",            "Logical Not",                OT_PREFIX         },
+	{	"++?",    "++",   "_operator_preincr",           "Prefix Increment",           OT_PREFIXASSIGN   },
+	{	"--?",    "--",   "_operator_predecr",           "Prefix Decrement",           OT_PREFIXASSIGN   },
+	{	"?\\?",   "\\",   "_operator_exponential",       "Exponentiation",             OT_INFIX          },
+	{	"?*?",    "*",    "_operator_multiply",          "Multiplication",             OT_INFIX          },
+	{	"?/?",    "/",    "_operator_divide",            "Division",                   OT_INFIX          },
+	{	"?%?",    "%",    "_operator_modulus",           "Modulo",                     OT_INFIX          },
+	{	"?+?",    "+",    "_operator_add",               "Addition",                   OT_INFIX          },
+	{	"?-?",    "-",    "_operator_subtract",          "Substraction",               OT_INFIX          },
+	{	"?<<?",   "<<",   "_operator_shiftleft",         "Shift Left",                 OT_INFIX          },
+	{	"?>>?",   ">>",   "_operator_shiftright",        "Shift Right",                OT_INFIX          },
+	{	"?<?",    "<",    "_operator_less",              "Less-than",                  OT_INFIX          },
+	{	"?>?",    ">",    "_operator_greater",           "Greater-than",               OT_INFIX          },
+	{	"?<=?",   "<=",   "_operator_lessequal",         "Less-than-or-Equal",         OT_INFIX          },
+	{	"?>=?",   ">=",   "_operator_greaterequal",      "Greater-than-or-Equal",      OT_INFIX          },
+	{	"?==?",   "==",   "_operator_equal",             "Equality",                   OT_INFIX          },
+	{	"?!=?",   "!=",   "_operator_notequal",          "Not-Equal",                  OT_INFIX          },
+	{	"?&?",    "&",    "_operator_bitand",            "Bitwise And",                OT_INFIX          },
+	{	"?^?",    "^",    "_operator_bitxor",            "Bitwise Xor",                OT_INFIX          },
+	{	"?|?",    "|",    "_operator_bitor",             "Bitwise Or",                 OT_INFIX          },
+	{	"?=?",    "=",    "_operator_assign",            "Assignment",                 OT_INFIXASSIGN    },
+	{	"?\\=?",  "\\=",  "_operator_expassign",         "Exponentiation Assignment",  OT_INFIXASSIGN    },
+	{	"?*=?",   "*=",   "_operator_multassign",        "Multiplication Assignment",  OT_INFIXASSIGN    },
+	{	"?/=?",   "/=",   "_operator_divassign",         "Division Assignment",        OT_INFIXASSIGN    },
+	{	"?%=?",   "%=",   "_operator_modassign",         "Modulo Assignment",          OT_INFIXASSIGN    },
+	{	"?+=?",   "+=",   "_operator_addassign",         "Addition Assignment",        OT_INFIXASSIGN    },
+	{	"?-=?",   "-=",   "_operator_subassign",         "Substrction Assignment",     OT_INFIXASSIGN    },
+	{	"?<<=?",  "<<=",  "_operator_shiftleftassign",   "Shift Left Assignment",      OT_INFIXASSIGN    },
+	{	"?>>=?",  ">>=",  "_operator_shiftrightassign",  "Shift Right Assignment",     OT_INFIXASSIGN    },
+	{	"?&=?",   "&=",   "_operator_bitandassign",      "Bitwise And Assignment",     OT_INFIXASSIGN    },
+	{	"?^=?",   "^=",   "_operator_bitxorassign",      "Bitwise Xor Assignment",     OT_INFIXASSIGN    },
+	{	"?|=?",   "|=",   "_operator_bitorassign",       "Bitwise Or Assignment",      OT_INFIXASSIGN    },
+}; // tableValues
+
+enum { numOps = sizeof( tableValues ) / sizeof( OperatorInfo ) };
+
+const OperatorInfo * operatorLookup( const std::string & inputName ) {
+	// Static information set up:
+	static std::unordered_map<std::string, const OperatorInfo *> inputTable;
+	if ( inputTable.empty() ) for ( const OperatorInfo & op : tableValues ) {
+		inputTable[ op.inputName ] = &op;
+	}
+
+	if ( inputName.find_first_of( "?^*+-!", 0, 1 ) == std::string::npos ) return nullptr; // prefilter
+	const OperatorInfo * ret = inputTable.find( inputName )->second;
+	// This can only happen if an invalid identifier name has been used.
+	assert( ret );
+	return ret;
+}
+
+bool isOperator( const std::string & inputName ) {
+	return operatorLookup( inputName ) != nullptr;
+}
+
+std::string operatorFriendlyName( const std::string & inputName ) {
+	const OperatorInfo * info = operatorLookup( inputName );
+	if ( info ) return info->friendlyName;
+	return "";
+}
+
+// This is only used in the demangler, so it is smaller (and only maybe slow).
+const OperatorInfo * operatorLookupByOutput( const std::string & outputName ) {
+	if ( '_' != outputName[0] ) return nullptr;
+	for ( const OperatorInfo & op : tableValues ) {
+		if ( outputName == op.outputName ) {
+			return &op;
+		}
+	}
+	return nullptr;
+}
+
+bool isConstructor( const std::string & inputName ) {
+	const OperatorInfo * info = operatorLookup( inputName );
+	if ( info ) return info->type == OT_CTOR;
+	return false;
+}
+
+bool isDestructor( const std::string & inputName ) {
+	const OperatorInfo * info = operatorLookup( inputName );
+	if ( info ) return info->type == OT_DTOR;
+	return false;
+}
+
+bool isCtorDtor( const std::string & inputName ) {
+	const OperatorInfo * info = operatorLookup( inputName );
+	if ( info ) return info->type <= OT_CONSTRUCTOR;
+	return false;
+}
+
+bool isAssignment( const std::string & inputName ) {
+	const OperatorInfo * info = operatorLookup( inputName );
+	if ( info ) return info->type > OT_CONSTRUCTOR && info->type <= OT_ASSIGNMENT;
+	return false;
+}
+
+bool isCtorDtorAssign( const std::string & inputName ) {
+	const OperatorInfo * info = operatorLookup( inputName );
+	if ( info ) return info->type <= OT_ASSIGNMENT;
+	return false;
+}
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/CodeGen/OperatorTable.h
===================================================================
--- src/CodeGen/OperatorTable.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,75 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// OperatorTable.h --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Fri Nov  3 14:53:00 2023
-// Update Count     : 27
-//
-
-#pragma once
-
-#include <string>
-
-namespace CodeGen {
-
-enum OperatorType {
-	OT_CTOR,
-	OT_DTOR,
-	OT_CONSTRUCTOR = OT_DTOR,
-	OT_PREFIXASSIGN,
-	OT_POSTFIXASSIGN,
-	OT_INFIXASSIGN,
-	OT_ASSIGNMENT = OT_INFIXASSIGN,
-	OT_CALL,
-	OT_PREFIX,
-	OT_INFIX,
-	OT_POSTFIX,
-	OT_INDEX,
-	OT_LABELADDRESS,
-	OT_CONSTANT
-};
-
-struct OperatorInfo {
-	// The Cforall special function name.
-	std::string inputName;
-	// The string used when the operator is used as an operator.
-	std::string symbol;
-	// The base name used in the mangled name.
-	std::string outputName;
-	// Human-readable name of the operator.
-	std::string friendlyName;
-	// The type of operator shows how it is used as an operator.
-	OperatorType type;
-};
-
-// Look up the operator (by inputName), return nullptr if no such operator.
-const OperatorInfo * operatorLookup( const std::string & inputName );
-// Is there an operator with this name?
-bool isOperator( const std::string & inputName );
-// Get the friendlyName of the operator with the inputName
-std::string operatorFriendlyName( const std::string & inputName );
-// Get the OperatorInfo with the given outputName, if one exists.
-const OperatorInfo * operatorLookupByOutput( const std::string & outputName );
-
-// Is the operator a constructor, destructor or any form of assignment.
-// (Last two are "or" combinations of the first three.)
-bool isConstructor( const std::string & );
-bool isDestructor( const std::string & );
-bool isAssignment( const std::string & );
-bool isCtorDtor( const std::string & );
-bool isCtorDtorAssign( const std::string & );
-
-} // namespace CodeGen
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/OperatorTable.hpp
===================================================================
--- src/CodeGen/OperatorTable.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/OperatorTable.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,75 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// OperatorTable.hpp --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Nov  3 14:53:00 2023
+// Update Count     : 27
+//
+
+#pragma once
+
+#include <string>
+
+namespace CodeGen {
+
+enum OperatorType {
+	OT_CTOR,
+	OT_DTOR,
+	OT_CONSTRUCTOR = OT_DTOR,
+	OT_PREFIXASSIGN,
+	OT_POSTFIXASSIGN,
+	OT_INFIXASSIGN,
+	OT_ASSIGNMENT = OT_INFIXASSIGN,
+	OT_CALL,
+	OT_PREFIX,
+	OT_INFIX,
+	OT_POSTFIX,
+	OT_INDEX,
+	OT_LABELADDRESS,
+	OT_CONSTANT
+};
+
+struct OperatorInfo {
+	// The Cforall special function name.
+	std::string inputName;
+	// The string used when the operator is used as an operator.
+	std::string symbol;
+	// The base name used in the mangled name.
+	std::string outputName;
+	// Human-readable name of the operator.
+	std::string friendlyName;
+	// The type of operator shows how it is used as an operator.
+	OperatorType type;
+};
+
+// Look up the operator (by inputName), return nullptr if no such operator.
+const OperatorInfo * operatorLookup( const std::string & inputName );
+// Is there an operator with this name?
+bool isOperator( const std::string & inputName );
+// Get the friendlyName of the operator with the inputName
+std::string operatorFriendlyName( const std::string & inputName );
+// Get the OperatorInfo with the given outputName, if one exists.
+const OperatorInfo * operatorLookupByOutput( const std::string & outputName );
+
+// Is the operator a constructor, destructor or any form of assignment.
+// (Last two are "or" combinations of the first three.)
+bool isConstructor( const std::string & );
+bool isDestructor( const std::string & );
+bool isAssignment( const std::string & );
+bool isCtorDtor( const std::string & );
+bool isCtorDtorAssign( const std::string & );
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/Options.h
===================================================================
--- src/CodeGen/Options.h	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ 	(revision )
@@ -1,37 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// Options.h --
-//
-// Author           : Andrew Beach
-// Created On       : Tue Apr 30 11:36:00 2019
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Feb 15 18:37:06 2020
-// Update Count     : 3
-//
-
-#pragma once
-
-struct Options {
-	// External Options: Same thoughout a pass.
-	bool pretty;
-	bool genC;
-	bool lineMarks;
-	bool printExprTypes;
-
-	// Internal Options: Changed on some recurisive calls.
-	bool anonymousUnused = false;
-
-	Options(bool pretty, bool genC, bool lineMarks, bool printExprTypes) :
-		pretty(pretty), genC(genC), lineMarks(lineMarks), printExprTypes(printExprTypes)
-		{}
-};
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/CodeGen/Options.hpp
===================================================================
--- src/CodeGen/Options.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
+++ src/CodeGen/Options.hpp	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -0,0 +1,37 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Options.h --
+//
+// Author           : Andrew Beach
+// Created On       : Tue Apr 30 11:36:00 2019
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sat Feb 15 18:37:06 2020
+// Update Count     : 3
+//
+
+#pragma once
+
+struct Options {
+	// External Options: Same thoughout a pass.
+	bool pretty;
+	bool genC;
+	bool lineMarks;
+	bool printExprTypes;
+
+	// Internal Options: Changed on some recurisive calls.
+	bool anonymousUnused = false;
+
+	Options(bool pretty, bool genC, bool lineMarks, bool printExprTypes) :
+		pretty(pretty), genC(genC), lineMarks(lineMarks), printExprTypes(printExprTypes)
+		{}
+};
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/module.mk
===================================================================
--- src/CodeGen/module.mk	(revision acb33f15d3e545defb3cca21e653745f42fa6553)
+++ src/CodeGen/module.mk	(revision 31f48370c9fb2839ef3cfac9f848ba193f19dc78)
@@ -18,19 +18,19 @@
 	CodeGen/CodeGenerator.cpp \
 	CodeGen/CodeGenerator.hpp \
-	CodeGen/GenType.cc \
-	CodeGen/GenType.h \
-	CodeGen/OperatorTable.cc \
-	CodeGen/OperatorTable.h
+	CodeGen/GenType.cpp \
+	CodeGen/GenType.hpp \
+	CodeGen/OperatorTable.cpp \
+	CodeGen/OperatorTable.hpp
 
 SRC += $(SRC_CODEGEN) \
-	CodeGen/Generate.cc \
-	CodeGen/Generate.h \
-	CodeGen/FixMain.cc \
-	CodeGen/FixMain.h \
-	CodeGen/FixNames.cc \
-	CodeGen/FixNames.h \
-	CodeGen/LinkOnce.cc \
-	CodeGen/LinkOnce.h \
-	CodeGen/Options.h
+	CodeGen/FixMain.cpp \
+	CodeGen/FixMain.hpp \
+	CodeGen/FixNames.cpp \
+	CodeGen/FixNames.hpp \
+	CodeGen/Generate.cpp \
+	CodeGen/Generate.hpp \
+	CodeGen/LinkOnce.cpp \
+	CodeGen/LinkOnce.hpp \
+	CodeGen/Options.hpp
 
 SRCDEMANGLE += $(SRC_CODEGEN)
