aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-12-22 23:26:02 +0000
committerJim Grosbach <grosbach@apple.com>2010-12-22 23:26:02 +0000
commit9584bd83e6042484da11ab592c9b1eb04c61b014 (patch)
tree1ff4ff00d394090d3527727f8ed0abd352cc399b
parentf50125ecaab0cc379892280de33f0a2d387f7f5b (diff)
downloadexternal_llvm-9584bd83e6042484da11ab592c9b1eb04c61b014.zip
external_llvm-9584bd83e6042484da11ab592c9b1eb04c61b014.tar.gz
external_llvm-9584bd83e6042484da11ab592c9b1eb04c61b014.tar.bz2
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122456 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmLexer.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp b/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp
index f859d1b..e79a332 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp
@@ -28,20 +28,20 @@
using namespace llvm;
namespace {
-
+
class ARMBaseAsmLexer : public TargetAsmLexer {
const MCAsmInfo &AsmInfo;
-
+
const AsmToken &lexDefinite() {
return getLexer()->Lex();
}
-
+
AsmToken LexTokenUAL();
protected:
typedef std::map <std::string, unsigned> rmap_ty;
-
+
rmap_ty RegisterMap;
-
+
void InitRegisterMap(const TargetRegisterInfo *info) {
unsigned numRegs = info->getNumRegs();
@@ -51,7 +51,7 @@ namespace {
RegisterMap[regName] = i;
}
}
-
+
unsigned MatchRegisterName(StringRef Name) {
rmap_ty::iterator iter = RegisterMap.find(Name.str());
if (iter != RegisterMap.end())
@@ -59,13 +59,13 @@ namespace {
else
return 0;
}
-
+
AsmToken LexToken() {
if (!Lexer) {
SetError(SMLoc(), "No MCAsmLexer installed");
return AsmToken(AsmToken::Error, "", 0);
}
-
+
switch (AsmInfo.getAssemblerDialect()) {
default:
SetError(SMLoc(), "Unhandled dialect");
@@ -79,26 +79,26 @@ namespace {
: TargetAsmLexer(T), AsmInfo(MAI) {
}
};
-
+
class ARMAsmLexer : public ARMBaseAsmLexer {
public:
ARMAsmLexer(const Target &T, const MCAsmInfo &MAI)
: ARMBaseAsmLexer(T, MAI) {
std::string tripleString("arm-unknown-unknown");
std::string featureString;
- OwningPtr<const TargetMachine>
+ OwningPtr<const TargetMachine>
targetMachine(T.createTargetMachine(tripleString, featureString));
InitRegisterMap(targetMachine->getRegisterInfo());
}
};
-
+
class ThumbAsmLexer : public ARMBaseAsmLexer {
public:
ThumbAsmLexer(const Target &T, const MCAsmInfo &MAI)
: ARMBaseAsmLexer(T, MAI) {
std::string tripleString("thumb-unknown-unknown");
std::string featureString;
- OwningPtr<const TargetMachine>
+ OwningPtr<const TargetMachine>
targetMachine(T.createTargetMachine(tripleString, featureString));
InitRegisterMap(targetMachine->getRegisterInfo());
}
@@ -107,7 +107,7 @@ namespace {
AsmToken ARMBaseAsmLexer::LexTokenUAL() {
const AsmToken &lexedToken = lexDefinite();
-
+
switch (lexedToken.getKind()) {
default:
return AsmToken(lexedToken);
@@ -119,9 +119,9 @@ AsmToken ARMBaseAsmLexer::LexTokenUAL() {
std::string upperCase = lexedToken.getString().str();
std::string lowerCase = LowercaseString(upperCase);
StringRef lowerRef(lowerCase);
-
+
unsigned regID = MatchRegisterName(lowerRef);
-
+
if (regID) {
return AsmToken(AsmToken::Register,
lexedToken.getString(),