}
bool COFFAsmParser::ParseSEHDirectivePushFrame(StringRef, SMLoc) {
- bool Code;
+ bool Code = false;
StringRef CodeID;
- SMLoc startLoc = getLexer().getLoc();
- if (!getParser().ParseIdentifier(CodeID)) {
- if (CodeID != "@code")
- return Error(startLoc, "expected @code");
- Code = true;
+ if (getLexer().is(AsmToken::At)) {
+ SMLoc startLoc = getLexer().getLoc();
+ Lex();
+ if (!getParser().ParseIdentifier(CodeID)) {
+ if (CodeID != "code")
+ return Error(startLoc, "expected @code");
+ Code = true;
+ }
}
if (getLexer().isNot(AsmToken::EndOfStatement))
# RUN: llvm-mc -triple x86_64-pc-win32 %s | FileCheck %s
# CHECK: .seh_proc func
+# CHECK: .seh_pushframe @code
# CHECK: .seh_stackalloc 24
# CHECK: .seh_endprologue
# CHECK: .seh_handler __C_specific_handler, @except
.def func; .scl 2; .type 32; .endef
.seh_proc func
func:
+ .seh_pushframe @code
subq $24, %rsp
.seh_stackalloc 24
.seh_endprologue