diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp --- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -1657,7 +1657,7 @@ if (NextTok.is(AsmToken::Identifier) && NextTok.getIdentifier().equals_lower("ptr")) { SM.onCast(Identifier); - // eat type and ptr + // Eat type and PTR. consumeToken(); End = consumeToken(); break; diff --git a/llvm/test/tools/llvm-ml/struct.test b/llvm/test/tools/llvm-ml/struct.test --- a/llvm/test/tools/llvm-ml/struct.test +++ b/llvm/test/tools/llvm-ml/struct.test @@ -156,6 +156,7 @@ x BYTE ? y BYTE ? ENDS + after_struct BYTE ? ENDS z DWORD ? QUUX ENDS @@ -166,6 +167,7 @@ mov eax, [ebx].QUUX.w mov eax, [ebx].QUUX.x mov eax, [ebx].QUUX.y +mov eax, [ebx].QUUX.after_struct mov eax, [ebx].QUUX.z ; CHECK: t9: @@ -174,6 +176,7 @@ ; CHECK-NEXT: mov eax, dword ptr [ebx + 4] ; CHECK-NEXT: mov eax, dword ptr [ebx + 4] ; CHECK-NEXT: mov eax, dword ptr [ebx + 5] +; CHECK-NEXT: mov eax, dword ptr [ebx + 4] ; CHECK-NEXT: mov eax, dword ptr [ebx + 8] t10: