diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-01-07 03:13:18 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-01-07 03:13:18 +0000 |
commit | 07082096428579009bf20eb276b3e67707a0916d (patch) | |
tree | b5dbd400d34b1353d137cdbc7e4a042938769200 /llvm/lib/MC/MCStreamer.cpp | |
parent | 00b1a3cd7e9fb9b578a39414c7048d4c23b7105a (diff) | |
download | bcm5719-llvm-07082096428579009bf20eb276b3e67707a0916d.tar.gz bcm5719-llvm-07082096428579009bf20eb276b3e67707a0916d.zip |
Split Finish into Finish and FinishImpl to have a common place to do end of
file error checking. Use that to error on an unfinished cfi_startproc.
The error is not nice, but is already better than a segmentation fault.
llvm-svn: 147717
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 8567941c45a..ce9de9d4c51 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -652,3 +652,10 @@ void MCStreamer::EmitW64Tables() { MCWin64EHUnwindEmitter::Emit(*this); } + +void MCStreamer::Finish() { + if (!FrameInfos.empty() && !FrameInfos.back().End) + report_fatal_error("Unfinished frame!"); + + FinishImpl(); +} |