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
This commit is contained in:
Charles Davis
2011-05-25 21:43:45 +00:00
parent 7bb1c40549
commit 410ef2b263
4 changed files with 40 additions and 2 deletions

View File

@@ -195,6 +195,17 @@ namespace llvm {
}
}
/// SwitchSectionNoChange - Set the current section where code is being
/// emitted to @p Section. This is required to update CurSection. This
/// version does not call ChangeSection.
void SwitchSectionNoChange(const MCSection *Section) {
assert(Section && "Cannot switch to a null section!");
const MCSection *curSection = SectionStack.back().first;
SectionStack.back().second = curSection;
if (Section != curSection)
SectionStack.back().first = Section;
}
/// InitSections - Create the default sections and set the initial one.
virtual void InitSections() = 0;