diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-08-23 17:14:32 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-08-23 17:14:32 +0000 |
commit | 33d7b762d009f52000984804bbbe01ab02b30f66 (patch) | |
tree | f05d418140464705a578cfa505447c15569edd03 /llvm/lib/MC/MCParser/AsmLexer.cpp | |
parent | ada2bb3d5d61d541ba5156ae76576b9e5ef45383 (diff) | |
download | bcm5719-llvm-33d7b762d009f52000984804bbbe01ab02b30f66.tar.gz bcm5719-llvm-33d7b762d009f52000984804bbbe01ab02b30f66.zip |
Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D23789
llvm-svn: 279535
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmLexer.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmLexer.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp index 832c39a2c75..71e35448919 100644 --- a/llvm/lib/MC/MCParser/AsmLexer.cpp +++ b/llvm/lib/MC/MCParser/AsmLexer.cpp @@ -11,16 +11,21 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/APInt.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/ADT/StringRef.h" #include "llvm/MC/MCParser/AsmLexer.h" +#include "llvm/MC/MCParser/MCAsmLexer.h" #include "llvm/MC/MCAsmInfo.h" -#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/SMLoc.h" +#include <cassert> #include <cctype> -#include <cerrno> #include <cstdio> -#include <cstdlib> +#include <cstring> #include <tuple> +#include <string> +#include <utility> using namespace llvm; @@ -136,6 +141,7 @@ static bool IsIdentifierChar(char c, bool AllowAt) { return isalnum(c) || c == '_' || c == '$' || c == '.' || (c == '@' && AllowAt) || c == '?'; } + AsmToken AsmLexer::LexIdentifier() { // Check for floating point literals. if (CurPtr[-1] == '.' && isdigit(*CurPtr)) { @@ -225,7 +231,7 @@ static void SkipIgnoredIntegerSuffix(const char *&CurPtr) { static unsigned doLookAhead(const char *&CurPtr, unsigned DefaultRadix) { const char *FirstHex = nullptr; const char *LookAhead = CurPtr; - while (1) { + while (true) { if (isdigit(*LookAhead)) { ++LookAhead; } else if (isxdigit(*LookAhead)) { @@ -400,7 +406,6 @@ AsmToken AsmLexer::LexSingleQuote() { return AsmToken(AsmToken::Integer, Res, Value); } - /// LexQuote: String: "..." AsmToken AsmLexer::LexQuote() { int CurChar = getNextChar(); |