diff options
author | Eli Bendersky <eliben@google.com> | 2013-01-16 00:50:52 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-01-16 00:50:52 +0000 |
commit | 171192f149dce679cd520f85ffced4789448b017 (patch) | |
tree | 5309b43318eeb9fd135de09dc105fc63c94013fb /lib/MC/MCParser/AsmParser.cpp | |
parent | 68b8d4f4ce9d2ab3b6f5b3d8adf6db1b3b3d3419 (diff) |
Use the ExtensionDirectiveHandler type in other places where it makes sense.
Since we already have this type it's a shame to keep dragging a pair of object
and method around explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 43c872b809..0db343049f 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -122,8 +122,6 @@ private: /// ExtensionDirectiveMap - maps directive names to handler methods in parser /// extensions. Extensions register themselves in this map by calling /// AddDirectiveHandler. - typedef std::pair<MCAsmParserExtension*, DirectiveHandler> - ExtensionDirectiveHandler; StringMap<ExtensionDirectiveHandler> ExtensionDirectiveMap; /// MacroMap - Map of currently defined macros. @@ -160,10 +158,9 @@ public: virtual bool Run(bool NoInitialTextSection, bool NoFinalize = false); - virtual void AddDirectiveHandler(MCAsmParserExtension *Object, - StringRef Directive, - DirectiveHandler Handler) { - ExtensionDirectiveMap[Directive] = std::make_pair(Object, Handler); + virtual void AddDirectiveHandler(StringRef Directive, + ExtensionDirectiveHandler Handler) { + ExtensionDirectiveMap[Directive] = Handler; } public: |