From 29b9f477964e204c9f018dff77f6f889773f64d9 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Wed, 16 Jan 2013 00:50:52 +0000 Subject: 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. llvm-svn: 172584 --- llvm/lib/MC/MCParser/AsmParser.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp') diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 43c872b8098..0db343049f3 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/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 - ExtensionDirectiveHandler; StringMap 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: -- cgit v1.2.3