From 7e08dd11957e9f1aab3501377728cad9e40f0866 Mon Sep 17 00:00:00 2001 From: Colin LeMahieu Date: Mon, 12 Oct 2015 17:57:02 +0000 Subject: [PATCH] [llvm-symbolizer] Reverting r250067 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250072 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandGuide/llvm-symbolizer.rst | 2 -- include/llvm/MC/MCParser/MCAsmLexer.h | 6 +++--- test/tools/llvm-symbolizer/Inputs/addr.inp | 1 - test/tools/llvm-symbolizer/sym.test | 19 ------------------- tools/llvm-symbolizer/llvm-symbolizer.cpp | 8 -------- 5 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 test/tools/llvm-symbolizer/Inputs/addr.inp delete mode 100644 test/tools/llvm-symbolizer/sym.test diff --git a/docs/CommandGuide/llvm-symbolizer.rst b/docs/CommandGuide/llvm-symbolizer.rst index 9d6571d5c4c..96720e633f2 100644 --- a/docs/CommandGuide/llvm-symbolizer.rst +++ b/docs/CommandGuide/llvm-symbolizer.rst @@ -98,8 +98,6 @@ OPTIONS location, look for the debug info at the .dSYM path provided via the ``-dsym-hint`` flag. This flag can be used multiple times. -.. option:: -print-address - Print address before the source code location. Defaults to false. EXIT STATUS ----------- diff --git a/include/llvm/MC/MCParser/MCAsmLexer.h b/include/llvm/MC/MCParser/MCAsmLexer.h index 64a6c9c1c98..a9a9357f827 100644 --- a/include/llvm/MC/MCParser/MCAsmLexer.h +++ b/include/llvm/MC/MCParser/MCAsmLexer.h @@ -189,13 +189,13 @@ public: } /// Get the kind of current token. - AsmToken::TokenKind getKind() const { return CurTok.getKind(); } + AsmToken::TokenKind getKind() const { return getTok().getKind(); } /// Check if the current token has kind \p K. - bool is(AsmToken::TokenKind K) const { return CurTok.is(K); } + bool is(AsmToken::TokenKind K) const { return getTok().is(K); } /// Check if the current token has kind \p K. - bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); } + bool isNot(AsmToken::TokenKind K) const { return getTok().isNot(K); } /// Set whether spaces should be ignored by the lexer void setSkipSpace(bool val) { SkipSpace = val; } diff --git a/test/tools/llvm-symbolizer/Inputs/addr.inp b/test/tools/llvm-symbolizer/Inputs/addr.inp deleted file mode 100644 index 4de096479da..00000000000 --- a/test/tools/llvm-symbolizer/Inputs/addr.inp +++ /dev/null @@ -1 +0,0 @@ -0x40054d diff --git a/test/tools/llvm-symbolizer/sym.test b/test/tools/llvm-symbolizer/sym.test deleted file mode 100644 index 559124a44c0..00000000000 --- a/test/tools/llvm-symbolizer/sym.test +++ /dev/null @@ -1,19 +0,0 @@ -#Source: -##include -#static inline int inc (int *a) { -# printf ("%d\n",(*a)++); -# return (*a)++; -#} -# -#int main () { -# int x = 1; -# return inc(&x); -#} -#Build as : clang -g -O2 addr.c - -RUN: llvm-symbolizer -inlining -print-address -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s - -#CHECK: 0x40054d -#CHECK: main -#CHECK: {{[/\]+}}tmp{{[/\]+}}x.c:9:0 - diff --git a/tools/llvm-symbolizer/llvm-symbolizer.cpp b/tools/llvm-symbolizer/llvm-symbolizer.cpp index b4485339b0d..9c9f3adbf60 100644 --- a/tools/llvm-symbolizer/llvm-symbolizer.cpp +++ b/tools/llvm-symbolizer/llvm-symbolizer.cpp @@ -73,9 +73,6 @@ static cl::list ClDsymHint("dsym-hint", cl::ZeroOrMore, cl::desc("Path to .dSYM bundles to search for debug info for the " "object files")); -static cl::opt - ClPrintAddress("print-address", cl::init(false), - cl::desc("Show address before line information")); static bool parseCommand(bool &IsData, std::string &ModuleName, uint64_t &ModuleOffset) { @@ -155,11 +152,6 @@ int main(int argc, char **argv) { std::string Result = IsData ? Symbolizer.symbolizeData(ModuleName, ModuleOffset) : Symbolizer.symbolizeCode(ModuleName, ModuleOffset); - if (ClPrintAddress) { - outs() << "0x"; - outs().write_hex(ModuleOffset); - outs() << "\n"; - } outs() << Result << "\n"; outs().flush(); } -- 2.34.1