diff options
author | Charles Davis <cdavis@mines.edu> | 2011-05-25 21:43:45 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2011-05-25 21:43:45 +0000 |
commit | 410ef2b263e92d3de1b2acff7437059400daed7d (patch) | |
tree | 7ef4c026f98f34a6c6c4b99110ff0ceb933cf438 /lib/MC/MCAsmStreamer.cpp | |
parent | 7bb1c4054986e51682ff89170c740cc16b921236 (diff) |
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
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 1df5c07474..9376d55e71 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -973,6 +973,15 @@ void MCAsmStreamer::EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind, void MCAsmStreamer::EmitWin64EHHandlerData() { MCStreamer::EmitWin64EHHandlerData(); + // Switch sections. Don't call SwitchSection directly, because that will + // cause the section switch to be visible in the emitted assembly. + // We only do this so the section switch that terminates the handler + // data block is visible. + const MCSection *xdataSect = + getContext().getTargetAsmInfo().getWin64EHTableSection(); + if (xdataSect) + SwitchSectionNoChange(xdataSect); + OS << "\t.seh_handlerdata"; EmitEOL(); } |