mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-26 03:15:19 +00:00
f4d9338dfb
Symbols.cpp contains functions to handle ELF symbols. demangle() function is essentially a function to work on a string rather than on an ELF symbol. So Strings.cpp is a better place to put that function. This change also make demangle to demangle symbols unconditionally. Previously, it demangled symbols only when Config->Demangle is true. llvm-svn: 274804
30 lines
806 B
C++
30 lines
806 B
C++
//===- Strings.h ------------------------------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Linker
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLD_COFF_STRINGS_H
|
|
#define LLD_COFF_STRINGS_H
|
|
|
|
#include "lld/Core/LLVM.h"
|
|
#include <vector>
|
|
|
|
namespace lld {
|
|
namespace elf {
|
|
bool globMatch(StringRef S, StringRef T);
|
|
std::vector<uint8_t> parseHex(StringRef S);
|
|
bool isValidCIdentifier(StringRef S);
|
|
|
|
// Returns a demangled C++ symbol name. If Name is not a mangled
|
|
// name or the system does not provide __cxa_demangle function,
|
|
// it returns an unmodified string.
|
|
std::string demangle(StringRef Name);
|
|
}
|
|
}
|
|
|
|
#endif
|