mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- Added missing ifdef guard in PointerIntEnum header - Consistent naming convention for ifdef guards - Consistent 'end namespace swift' - Consistent single EOL at end of header files
61 lines
1.8 KiB
C++
61 lines
1.8 KiB
C++
//===--- DemangleWrappers.h -------------------------------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2016 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// This file defines wrappers for the Swift demangler that use LLVM data
|
|
/// types.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_BASIC_DEMANGLEWRAPPERS_H
|
|
#define SWIFT_BASIC_DEMANGLEWRAPPERS_H
|
|
|
|
#include "swift/Basic/Demangle.h"
|
|
#include "swift/Basic/LLVM.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
namespace swift {
|
|
namespace demangle_wrappers {
|
|
|
|
using swift::Demangle::Node;
|
|
using swift::Demangle::NodePointer;
|
|
using swift::Demangle::DemangleOptions;
|
|
|
|
class NodeDumper {
|
|
NodePointer Root;
|
|
|
|
public:
|
|
NodeDumper(NodePointer Root): Root(std::move(Root)) {}
|
|
void dump() const;
|
|
void print(llvm::raw_ostream &Out) const;
|
|
};
|
|
|
|
NodePointer
|
|
demangleSymbolAsNode(StringRef MangledName,
|
|
const DemangleOptions &Options = DemangleOptions());
|
|
|
|
std::string nodeToString(NodePointer Root,
|
|
const DemangleOptions &Options = DemangleOptions());
|
|
|
|
std::string
|
|
demangleSymbolAsString(StringRef MangledName,
|
|
const DemangleOptions &Options = DemangleOptions());
|
|
|
|
std::string
|
|
demangleTypeAsString(StringRef MangledTypeName,
|
|
const DemangleOptions &Options = DemangleOptions());
|
|
|
|
} // end namespace demangle_wrappers
|
|
} // end namespace swift
|
|
|
|
#endif // SWIFT_BASIC_DEMANGLEWRAPPERS_H
|