Add tests for .seh_setframe and .seh_handlerdata parsing. Fix issues with
them.

I had to add a special SwitchSectionNoChange method to MCStreamer just for
.seh_handlerdata. If this isn't OK, please let me know, and I'll find some
other way to fix .seh_handlerdata streaming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132084 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCParser/COFFAsmParser.cpp b/lib/MC/MCParser/COFFAsmParser.cpp
index 7fde4fe..64f6355 100644
--- a/lib/MC/MCParser/COFFAsmParser.cpp
+++ b/lib/MC/MCParser/COFFAsmParser.cpp
@@ -266,6 +266,10 @@
   int64_t Off;
   if (ParseSEHRegisterNumber(Reg))
     return true;
+  if (getLexer().isNot(AsmToken::Comma))
+    return TokError("you must specify a stack pointer offset");
+
+  Lex();
   SMLoc startLoc = getLexer().getLoc();
   if (getParser().ParseAbsoluteExpression(Off))
     return true;
@@ -304,7 +308,7 @@
   if (ParseSEHRegisterNumber(Reg))
     return true;
   if (getLexer().isNot(AsmToken::Comma))
-    return TokError("expected comma");
+    return TokError("you must specify an offset on the stack");
 
   Lex();
   SMLoc startLoc = getLexer().getLoc();
@@ -331,7 +335,7 @@
   if (ParseSEHRegisterNumber(Reg))
     return true;
   if (getLexer().isNot(AsmToken::Comma))
-    return TokError("expected comma");
+    return TokError("you must specify an offset on the stack");
 
   Lex();
   SMLoc startLoc = getLexer().getLoc();