Skip to content

Commit

Permalink
Remove the old mangler.
Browse files Browse the repository at this point in the history
NFC
  • Loading branch information
eeckstein committed Mar 17, 2017
1 parent b4c8b0c commit 1625345
Show file tree
Hide file tree
Showing 43 changed files with 148 additions and 3,715 deletions.
7 changes: 0 additions & 7 deletions include/swift/AST/ASTMangler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ class AbstractClosureExpr;

namespace NewMangling {

/// Utility function which selects either the old or new mangling for a type.
std::string mangleTypeForDebugger(Type Ty, const DeclContext *DC);

/// Utility function which selects either the old or new mangling for a type and
/// mangles the type as USR.
std::string mangleTypeAsUSR(Type Ty);

/// The mangler for AST declarations.
class ASTMangler : public Mangler {
protected:
Expand Down
192 changes: 0 additions & 192 deletions include/swift/AST/Mangle.h

This file was deleted.

8 changes: 0 additions & 8 deletions include/swift/Basic/Mangler.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ using llvm::ArrayRef;
namespace swift {
namespace NewMangling {

/// Select an old or new mangled string, based on useNewMangling().
///
/// Also performs test to check if the demangling of both string yield the same
/// demangling tree.
/// TODO: remove this function when the old mangling is removed.
std::string selectMangling(const std::string &Old, const std::string &New,
bool compareTrees = true);

void printManglingStats();

/// The basic Swift symbol mangler.
Expand Down
26 changes: 0 additions & 26 deletions include/swift/Demangling/ManglingMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
#ifndef SWIFT_DEMANGLING_MANGLING_MACROS_H
#define SWIFT_DEMANGLING_MANGLING_MACROS_H

// The following macro enables the "new" mangling, which has an _S prefix rather
// then the original _T prefix.
// TODO: When we get rid of the old mangling, the term "new mangling" should
// just be renamed to "mangling".

#define USE_NEW_MANGLING

#define STRINGIFY_MANGLING(M) #M
#define MANGLE_AS_STRING(M) STRINGIFY_MANGLING(M)

Expand All @@ -35,12 +28,9 @@
#define MANGLING_CONCAT2_IMPL(a, b) a##b
#define MANGLING_CONCAT3_IMPL(a, b, c) a##b##c

#ifdef USE_NEW_MANGLING

#define MANGLING_CONCAT2(a, b) MANGLING_CONCAT2_IMPL(a, b)
#define MANGLING_CONCAT3(a, b, c) MANGLING_CONCAT3_IMPL(a, b, c)
#define MANGLE_SYM(Ops) MANGLING_CONCAT2(MANGLING_PREFIX, Ops)
#define SELECT_MANGLING(Old, New) MANGLE_SYM(New)
#define METADATA_MANGLING N
#define METATYPE_MANGLING m
#define EMPTY_TUPLE_MANGLING yt
Expand All @@ -49,22 +39,6 @@
#define OBJC_PARTIAL_APPLY_THUNK_MANGLING Ta
#define OPTIONAL_MANGLING(Ty) MANGLING_CONCAT2_IMPL(Ty, Sg)

#else

#define MANGLING_CONCAT2(a, b) MANGLING_CONCAT2_IMPL(b, a)
#define MANGLING_CONCAT3(a, b, c) MANGLING_CONCAT3_IMPL(c, b, a)
#define MANGLE_SYM(Ops) MANGLING_CONCAT2_IMPL(_T, Ops)
#define SELECT_MANGLING(Old, New) MANGLE_SYM(Old)
#define METADATA_MANGLING M
#define METATYPE_MANGLING M
#define EMPTY_TUPLE_MANGLING T_
#define NO_ARGS_MANGLING T_T_
#define FUNC_TYPE_MANGLING F
#define OBJC_PARTIAL_APPLY_THUNK_MANGLING PAo
#define OPTIONAL_MANGLING(Ty) MANGLING_CONCAT3_IMPL(GSq, Ty, _)

#endif

#define FUNCTION_MANGLING \
MANGLING_CONCAT2(NO_ARGS_MANGLING, FUNC_TYPE_MANGLING)

Expand Down
Loading

0 comments on commit 1625345

Please sign in to comment.