summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-21 17:36:25 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-21 17:36:25 +0000
commit6879634efd8abaf05935bd61f22c6dcf339aad70 (patch)
tree08be736aa85a7c9e28cde08be0cde62000f7d2d1 /llvm/lib/MC/MCStreamer.cpp
parent643c922e66db2d0c247b22a9ad3963ef000b0101 (diff)
downloadbcm5719-llvm-6879634efd8abaf05935bd61f22c6dcf339aad70.tar.gz
bcm5719-llvm-6879634efd8abaf05935bd61f22c6dcf339aad70.zip
Don't allow .seh_handler and .seh_handlerdata directives inside chained
unwind areas. llvm-svn: 131795
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 1ec7688a5ed..a760f2cfb59 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -361,6 +361,8 @@ void MCStreamer::EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
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::EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
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) {
OpenPOWER on IntegriCloud