mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Types now have proper mangled names of the form _Tt<...> so they don't need any special treatment Swift SVN r6816
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
//===--- Demangle.h - Interface to Swift symbol demangling -----------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_BASIC_DEMANGLE_H
|
|
#define SWIFT_BASIC_DEMANGLE_H
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include <string>
|
|
|
|
namespace swift {
|
|
namespace Demangle {
|
|
/// \brief Demangle the given string as a Swift symbol.
|
|
///
|
|
/// Typical usage:
|
|
/// \code
|
|
/// std::string aDemangledName =
|
|
/// swift::Demangler::demangleSymbol("SomeSwiftMangledName")
|
|
/// \endcode
|
|
///
|
|
/// \param mangled The mangled string.
|
|
///
|
|
///
|
|
/// \returns The demangled string - or the mangled string on failure.
|
|
///
|
|
std::string demangleSymbol(llvm::StringRef mangled);
|
|
|
|
} // end namespace Demangle
|
|
} // end namespace swift
|
|
|
|
#endif
|