summaryrefslogtreecommitdiff
path: root/tools/llvm-cxxfilt
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-21 02:36:26 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-21 02:36:26 +0000
commit5e8f18007b664a935e813ef05d2833681a162ecf (patch)
tree8b5f8a0975a2049f0ba4ba7b2666dadbfb9ca3bc /tools/llvm-cxxfilt
parent5fe20f64f3f89254249a71743297cb2020b34f52 (diff)
llvm-cxxfilt: support the `-s` option
This is a stub implementation of the `-s` or `--format` option that allows the user to specify the demangling style. Since we only support the Itanium (GNU) style demangling, auto is synonymous with `gnu`. Simply swallow the option to permit some level of commandline compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cxxfilt')
-rw-r--r--tools/llvm-cxxfilt/llvm-cxxfilt.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/llvm-cxxfilt/llvm-cxxfilt.cpp b/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
index 6076a6313b3..8f90bcfc897 100644
--- a/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
+++ b/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
@@ -17,6 +17,25 @@
using namespace llvm;
+enum Style {
+ Auto, ///< auto-detect mangling
+ GNU, ///< GNU
+ Lucid, ///< Lucid compiler (lcc)
+ ARM,
+ HP, ///< HP compiler (xCC)
+ EDG, ///< EDG compiler
+ GNUv3, ///< GNU C++ v3 ABI
+ Java, ///< Java (gcj)
+ GNAT ///< ADA copiler (gnat)
+};
+static cl::opt<Style>
+ Format("format", cl::desc("decoration style"),
+ cl::values(clEnumValN(Auto, "auto", "auto-detect style"),
+ clEnumValN(GNU, "gnu", "GNU (itanium) style")),
+ cl::init(Auto));
+static cl::alias FormatShort("s", cl::desc("alias for --format"),
+ cl::aliasopt(Format));
+
static cl::opt<bool>
Types("types",
cl::desc("attempt to demangle types as well as function names"),