bool HasVariants = !C.getTargetInfo().hasNoAsmVariants();
+ unsigned LastAsmStringToken = 0;
+ unsigned LastAsmStringOffset = 0;
+
while (1) {
// Done with the string?
if (CurPtr == StrEnd) {
// (BeginLoc, EndLoc) represents the range of the operand we are currently
// processing. Unlike Str, the range includes the leading '%'.
- SourceLocation BeginLoc =
- getAsmString()->getLocationOfByte(Percent - StrStart, SM, LO, TI);
- SourceLocation EndLoc =
- getAsmString()->getLocationOfByte(CurPtr - StrStart, SM, LO, TI);
+ SourceLocation BeginLoc = getAsmString()->getLocationOfByte(
+ Percent - StrStart, SM, LO, TI, &LastAsmStringToken,
+ &LastAsmStringOffset);
+ SourceLocation EndLoc = getAsmString()->getLocationOfByte(
+ CurPtr - StrStart, SM, LO, TI, &LastAsmStringToken,
+ &LastAsmStringOffset);
Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc);
continue;
// (BeginLoc, EndLoc) represents the range of the operand we are currently
// processing. Unlike Str, the range includes the leading '%'.
- SourceLocation BeginLoc =
- getAsmString()->getLocationOfByte(Percent - StrStart, SM, LO, TI);
- SourceLocation EndLoc =
- getAsmString()->getLocationOfByte(NameEnd + 1 - StrStart, SM, LO, TI);
+ SourceLocation BeginLoc = getAsmString()->getLocationOfByte(
+ Percent - StrStart, SM, LO, TI, &LastAsmStringToken,
+ &LastAsmStringOffset);
+ SourceLocation EndLoc = getAsmString()->getLocationOfByte(
+ NameEnd + 1 - StrStart, SM, LO, TI, &LastAsmStringToken,
+ &LastAsmStringOffset);
Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc);