Use getLogicalLineNumber() in FuzzyParseMicrosoftAsmStatement(), it's more general and simplifies the code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46885 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseStmt.cpp b/Parse/ParseStmt.cpp
index 4be3f1e..f8ae4a0 100644
--- a/Parse/ParseStmt.cpp
+++ b/Parse/ParseStmt.cpp
@@ -922,21 +922,13 @@
// that the rest of the line is an assembly-language statement.
SourceManager &SrcMgr = PP.getSourceManager();
SourceLocation TokLoc = Tok.getLocation();
- if (TokLoc.isFileID()) {
- unsigned lineNo = SrcMgr.getLineNumber(TokLoc);
- do {
- ConsumeAnyToken();
- TokLoc = Tok.getLocation();
- } while (TokLoc.isFileID() && (SrcMgr.getLineNumber(TokLoc) == lineNo) &&
- Tok.isNot(tok::r_brace) && Tok.isNot(tok::semi) &&
- Tok.isNot(tok::eof));
- } else { // The asm tokens come from a macro expansion.
- do {
- ConsumeAnyToken();
- TokLoc = Tok.getLocation();
- } while (TokLoc.isMacroID() && Tok.isNot(tok::r_brace) &&
- Tok.isNot(tok::semi) && Tok.isNot(tok::eof));
- }
+ unsigned lineNo = SrcMgr.getLogicalLineNumber(TokLoc);
+ do {
+ ConsumeAnyToken();
+ TokLoc = Tok.getLocation();
+ } while ((SrcMgr.getLogicalLineNumber(TokLoc) == lineNo) &&
+ Tok.isNot(tok::r_brace) && Tok.isNot(tok::semi) &&
+ Tok.isNot(tok::eof));
}
return false;
}