[llvm-commits] [llvm] r131795 - /llvm/trunk/lib/MC/MCStreamer.cpp

Charles Davis cdavis at mines.edu
Sat May 21 10:36:25 PDT 2011


Author: cdavis
Date: Sat May 21 12:36:25 2011
New Revision: 131795

URL: http://llvm.org/viewvc/llvm-project?rev=131795&view=rev
Log:
Don't allow .seh_handler and .seh_handlerdata directives inside chained
unwind areas.

Modified:
    llvm/trunk/lib/MC/MCStreamer.cpp

Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=131795&r1=131794&r2=131795&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Sat May 21 12:36:25 2011
@@ -361,6 +361,8 @@
                                     bool Except) {
   EnsureValidW64UnwindInfo();
   MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
+  if (CurFrame->ChainedParent)
+    report_fatal_error("Chained unwind areas can't have handlers!");
   CurFrame->ExceptionHandler = Sym;
   if (!Except && !Unwind)
     report_fatal_error("Don't know what kind of handler this is!");
@@ -372,6 +374,9 @@
 
 void MCStreamer::EmitWin64EHHandlerData() {
   EnsureValidW64UnwindInfo();
+  MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
+  if (CurFrame->ChainedParent)
+    report_fatal_error("Chained unwind areas can't have handlers!");
 }
 
 void MCStreamer::EmitWin64EHPushReg(unsigned Register) {





More information about the llvm-commits mailing list