aboutsummaryrefslogtreecommitdiff
path: root/lib/MC
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-20 01:02:45 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-20 01:02:45 +0000
commit4e472d2277fcafb62c65539ac832a6ebd68c1a4d (patch)
tree9f4d0ada9468850079494e85efbb9ef3afa75370 /lib/MC
parent17feeec8d861e99e5860389839e805b2653a2977 (diff)
[ms-inline asm] Rename AsmOpRewrite to just AsmRewrite to be more generic. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index c8fc4c02bc..f22b2754f6 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -3575,7 +3575,7 @@ bool AsmParser::ParseDirectiveEndr(SMLoc DirectiveLoc) {
}
namespace {
-enum AsmOpRewriteKind {
+enum AsmRewriteKind {
AOK_Imm,
AOK_Input,
AOK_Output,
@@ -3583,13 +3583,13 @@ enum AsmOpRewriteKind {
AOK_Skip
};
-struct AsmOpRewrite {
- AsmOpRewriteKind Kind;
+struct AsmRewrite {
+ AsmRewriteKind Kind;
SMLoc Loc;
unsigned Len;
unsigned Size;
public:
- AsmOpRewrite(AsmOpRewriteKind kind, SMLoc loc, unsigned len, unsigned size = 0)
+ AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len, unsigned size = 0)
: Kind(kind), Loc(loc), Len(len), Size(size) { }
};
}
@@ -3608,7 +3608,7 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
SmallVector<std::string, 4> OutputConstraints;
std::set<std::string> ClobberRegs;
- SmallVector<struct AsmOpRewrite, 4> AsmStrRewrites;
+ SmallVector<struct AsmRewrite, 4> AsmStrRewrites;
// Prime the lexer.
Lex();
@@ -3634,7 +3634,7 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
// emitting this directive.
if (PreParseCondStateIgnore && TheCondState.Ignore) {
unsigned Len = getLexer().getLoc().getPointer() - Start.getPointer();
- AsmStrRewrites.push_back(AsmOpRewrite(AOK_Skip, Start, Len));
+ AsmStrRewrites.push_back(AsmRewrite(AOK_Skip, Start, Len));
continue;
}
@@ -3647,7 +3647,7 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
// Immediate.
if (Operand->isImm()) {
- AsmStrRewrites.push_back(AsmOpRewrite(AOK_Imm,
+ AsmStrRewrites.push_back(AsmRewrite(AOK_Imm,
Operand->getStartLoc(),
Operand->getNameLen()));
continue;
@@ -3673,7 +3673,7 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
if (OpDecl) {
bool isOutput = (i == 1) && Desc.mayStore();
if (Operand->needSizeDirective())
- AsmStrRewrites.push_back(AsmOpRewrite(AOK_SizeDirective,
+ AsmStrRewrites.push_back(AsmRewrite(AOK_SizeDirective,
Operand->getStartLoc(), 0,
Operand->getMemSize()));
@@ -3683,13 +3683,13 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
OutputDecls.push_back(OpDecl);
Constraint += Operand->getConstraint().str();
OutputConstraints.push_back(Constraint);
- AsmStrRewrites.push_back(AsmOpRewrite(AOK_Output,
+ AsmStrRewrites.push_back(AsmRewrite(AOK_Output,
Operand->getStartLoc(),
Operand->getNameLen()));
} else {
InputDecls.push_back(OpDecl);
InputConstraints.push_back(Operand->getConstraint().str());
- AsmStrRewrites.push_back(AsmOpRewrite(AOK_Input,
+ AsmStrRewrites.push_back(AsmRewrite(AOK_Input,
Operand->getStartLoc(),
Operand->getNameLen()));
}
@@ -3728,14 +3728,14 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
// Build the IR assembly string.
std::string AsmStringIR;
- AsmOpRewriteKind PrevKind = AOK_Imm;
+ AsmRewriteKind PrevKind = AOK_Imm;
raw_string_ostream OS(AsmStringIR);
const char *Start = SrcMgr.getMemoryBuffer(0)->getBufferStart();
- for (SmallVectorImpl<struct AsmOpRewrite>::iterator
+ for (SmallVectorImpl<struct AsmRewrite>::iterator
I = AsmStrRewrites.begin(), E = AsmStrRewrites.end(); I != E; ++I) {
const char *Loc = (*I).Loc.getPointer();
- AsmOpRewriteKind Kind = (*I).Kind;
+ AsmRewriteKind Kind = (*I).Kind;
// Emit everything up to the immediate/expression. If the previous rewrite
// was a size directive, then this has already been done.