OSDN Git Service

[Asm] Refactor debug printing of AsmToken
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 6 Mar 2018 14:02:14 +0000 (14:02 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 6 Mar 2018 14:02:14 +0000 (14:02 +0000)
commit3c24f8abd86fb887d8419cdcb47e54d561895cc3
tree06aa531ae25995b7e4f247ad5f8b337e34d194d1
parentdc7756a32cd8eb79194f4ddd1ae99a3358592d98
[Asm] Refactor debug printing of AsmToken

* Move printing from llvm-mc to the AsmToken class, so that it can be used elsewhere.
* Add 5 cases which were missed: BigNum, Comment, HashDirective, Space and
  BackSlash, and remove the default case so that -Wswitch will catch this error
  in future.

This is almost NFC, except for the fact that llvm-mc can now print those 5
tokens in -as-lex mode.

Differential revision: https://reviews.llvm.org/D43936

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326794 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/MCAsmLexer.h
lib/MC/MCParser/MCAsmLexer.cpp
tools/llvm-mc/llvm-mc.cpp