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
This commit is contained in:
Eli Bendersky
2013-01-16 00:50:52 +00:00
parent 68b8d4f4ce
commit 171192f149
5 changed files with 20 additions and 18 deletions

View File

@@ -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: