[PATCH] D17579: Add capability to push/pop DFI in MCStreamer. NFC
Amaury SECHET via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 14:27:37 PST 2016
deadalnix updated this revision to Diff 48981.
deadalnix added a comment.
Remove push/pop
http://reviews.llvm.org/D17579
Files:
include/llvm/MC/MCStreamer.h
lib/MC/MCStreamer.cpp
Index: lib/MC/MCStreamer.cpp
===================================================================
--- lib/MC/MCStreamer.cpp
+++ lib/MC/MCStreamer.cpp
@@ -174,6 +174,11 @@
return &DwarfFrameInfos.back();
}
+bool MCStreamer::hasUnfinishedDwarfFrameInfo() {
+ MCDwarfFrameInfo *CurFrame = getCurrentDwarfFrameInfo();
+ return CurFrame && !CurFrame->End;
+}
+
void MCStreamer::EnsureValidDwarfFrame() {
MCDwarfFrameInfo *CurFrame = getCurrentDwarfFrameInfo();
if (!CurFrame || CurFrame->End)
@@ -238,8 +243,7 @@
}
void MCStreamer::EmitCFIStartProc(bool IsSimple) {
- MCDwarfFrameInfo *CurFrame = getCurrentDwarfFrameInfo();
- if (CurFrame && !CurFrame->End)
+ if (hasUnfinishedDwarfFrameInfo())
report_fatal_error("Starting a frame before finishing the previous one!");
MCDwarfFrameInfo Frame;
Index: include/llvm/MC/MCStreamer.h
===================================================================
--- include/llvm/MC/MCStreamer.h
+++ include/llvm/MC/MCStreamer.h
@@ -222,6 +222,8 @@
return DwarfFrameInfos;
}
+ bool hasUnfinishedDwarfFrameInfo();
+
unsigned getNumWinFrameInfos() { return WinFrameInfos.size(); }
ArrayRef<WinEH::FrameInfo *> getWinFrameInfos() const {
return WinFrameInfos;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17579.48981.patch
Type: text/x-patch
Size: 1241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160224/b58f2c3b/attachment.bin>
More information about the llvm-commits
mailing list