source: src/SymTab/Mangler.h @ d1e0979

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since d1e0979 was d1e0979, checked in by Rob Schluntz <rschlunt@…>, 4 years ago

Add a basic demangler that works for basic types, pointers, tuples, and functions

  • Property mode set to 100644
File size: 1.5 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// Mangler.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Sun May 17 21:44:03 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:45:30 2017
13// Update Count     : 15
14//
15
16#pragma once
17
18#include <map>                // for map, map<>::value_compare
19#include <sstream>            // for ostringstream
20#include <string>             // for string
21#include <utility>            // for pair
22
23#include "SynTree/SynTree.h"  // for Types
24#include "SynTree/Visitor.h"  // for Visitor, maybeAccept
25
26namespace SymTab {
27        namespace Mangler {
28                /// Mangle syntax tree object; primary interface to clients
29                std::string mangle( BaseSyntaxNode * decl, bool mangleOverridable = true, bool typeMode = false, bool mangleGenericParams = true );
30
31                /// Mangle a type name; secondary interface
32                std::string mangleType( Type* ty );
33                /// Mangle ignoring generic type parameters
34                std::string mangleConcrete( Type* ty );
35
36                extern const char *btLetter[];
37                extern const int numBtLetter;
38                extern const std::map<int, const char *> qualifierLetter;
39                extern const std::string nameSeparator;
40        } // Mangler
41} // SymTab
42
43extern "C" {
44        std::string cforall_demangle(const std::string &);
45}
46
47// Local Variables: //
48// tab-width: 4 //
49// mode: c++ //
50// compile-command: "make install" //
51// End: //
Note: See TracBrowser for help on using the repository browser.