aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/MC/MCParser/MCAsmParser.h4
-rw-r--r--lib/MC/MCParser/AsmParser.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/MC/MCParser/MCAsmParser.h b/include/llvm/MC/MCParser/MCAsmParser.h
index cb8476d2ce..eeeacbc2fc 100644
--- a/include/llvm/MC/MCParser/MCAsmParser.h
+++ b/include/llvm/MC/MCParser/MCAsmParser.h
@@ -174,6 +174,10 @@ public:
/// on error.
/// @result - False on success.
virtual bool ParseAbsoluteExpression(int64_t &Res) = 0;
+
+ /// CheckForValidSection - Ensure that we have a valid section set in the
+ /// streamer. Otherwise, report and error and switch to .text.
+ virtual void CheckForValidSection() = 0;
};
/// \brief Create an MCAsmParser instance.
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index 262cb2ca61..45aaa2ec75 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -233,10 +233,10 @@ public:
virtual bool MacrosEnabled() {return MacrosEnabledFlag;}
virtual void SetMacrosEnabled(bool flag) {MacrosEnabledFlag = flag;}
+ virtual void CheckForValidSection();
/// }
private:
- void CheckForValidSection();
bool ParseStatement(ParseStatementInfo &Info);
void EatToEndOfLine();