diff options
author | Eli Bendersky <eliben@google.com> | 2013-01-14 18:08:41 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-01-14 18:08:41 +0000 |
commit | 733c336327621d41617d3d49c7b86199a361a367 (patch) | |
tree | 89a0773eb1877dae46bdb2198759ba2646c1580e /include/llvm/MC/MCParser | |
parent | 800ec3da7af7b73cd3c61d5da53d9d7c8343ad83 (diff) | |
download | external_llvm-733c336327621d41617d3d49c7b86199a361a367.zip external_llvm-733c336327621d41617d3d49c7b86199a361a367.tar.gz external_llvm-733c336327621d41617d3d49c7b86199a361a367.tar.bz2 |
Encapsulate the MacroEnabled flag in AsmParser behind accessor methods.
The methods are also exposed via the MCAsmParser interface, which allows more
than one client to control them. Previously, GenericAsmParser was playing with
a member var in AsmParser directly (by virtue of being its friend).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCParser')
-rw-r--r-- | include/llvm/MC/MCParser/MCAsmParser.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/MC/MCParser/MCAsmParser.h b/include/llvm/MC/MCParser/MCAsmParser.h index 8c4c06b..a0433f9 100644 --- a/include/llvm/MC/MCParser/MCAsmParser.h +++ b/include/llvm/MC/MCParser/MCAsmParser.h @@ -136,6 +136,10 @@ public: /// recovery. virtual void EatToEndOfStatement() = 0; + /// Control a flag in the parser that enables or disables macros. + virtual bool MacrosEnabled() = 0; + virtual void SetMacrosEnabled(bool flag) = 0; + /// ParseExpression - Parse an arbitrary expression. /// /// @param Res - The value of the expression. The result is undefined |