aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCStreamer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCStreamer.h')
-rw-r--r--include/llvm/MC/MCStreamer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index e152c39e19..1ce1b0e09d 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -54,6 +54,10 @@ namespace llvm {
/// kept up to date by SwitchSection.
const MCSection *CurSection;
+ /// PrevSection - This is the previous section code is being emitted to, it is
+ /// kept up to date by SwitchSection.
+ const MCSection *PrevSection;
+
public:
virtual ~MCStreamer();
@@ -96,6 +100,10 @@ namespace llvm {
/// emitting code to.
const MCSection *getCurrentSection() const { return CurSection; }
+ /// getPreviousSection - Return the previous section that the streamer is
+ /// emitting code to.
+ const MCSection *getPreviousSection() const { return PrevSection; }
+
/// SwitchSection - Set the current section where code is being emitted to
/// @p Section. This is required to update CurSection.
///