mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Moving the Swift demangler from libSIL to libBasic
Plus, a couple of minor cosmetic changes that I had held off for a couple days now Swift SVN r6691
This commit is contained in:
53
include/swift/Basic/Demangle.h
Normal file
53
include/swift/Basic/Demangle.h
Normal file
@@ -0,0 +1,53 @@
|
||||
//===--- 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);
|
||||
|
||||
/// \brief Demangle the given string as a Swift type.
|
||||
///
|
||||
/// Typical usage:
|
||||
/// \code
|
||||
/// std::string aDemangledName =
|
||||
/// swift::Demangler::demangleType("SomeSwiftMangledName")
|
||||
/// \endcode
|
||||
///
|
||||
/// \param mangled The mangled string.
|
||||
///
|
||||
///
|
||||
/// \returns The demangled string - or the mangled string on failure.
|
||||
std::string demangleType(llvm::StringRef mangled);
|
||||
|
||||
} // end namespace Demangle
|
||||
} // end namespace swift
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user