diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-07-07 23:04:15 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-07-07 23:04:15 +0000 |
| commit | f4d9338dfb60f7eb4c59b85409bcd3cc69b0becc (patch) | |
| tree | 3f1b163758c2d2df53aff6c2781bddd48c24f173 /lld/ELF/Strings.h | |
| parent | 580d7a1b1ea827fc9b2f170855e0b830659aa456 (diff) | |
| download | bcm5719-llvm-f4d9338dfb60f7eb4c59b85409bcd3cc69b0becc.tar.gz bcm5719-llvm-f4d9338dfb60f7eb4c59b85409bcd3cc69b0becc.zip | |
Move demangle() from Symbols.cpp to Strings.cpp.
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
Diffstat (limited to 'lld/ELF/Strings.h')
| -rw-r--r-- | lld/ELF/Strings.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/ELF/Strings.h b/lld/ELF/Strings.h index 002e8c2b843..4948e9dbd56 100644 --- a/lld/ELF/Strings.h +++ b/lld/ELF/Strings.h @@ -18,6 +18,11 @@ 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); } } |

