summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-01-16 00:50:52 +0000
committerEli Bendersky <eliben@google.com>2013-01-16 00:50:52 +0000
commit29b9f477964e204c9f018dff77f6f889773f64d9 (patch)
tree292327b4d223803a88e612c450000896f5aca8b5 /llvm/lib/MC/MCParser/AsmParser.cpp
parent2abd5ef841a458d1f55ccfe424b2570d8213ad9f (diff)
downloadbcm5719-llvm-29b9f477964e204c9f018dff77f6f889773f64d9.tar.gz
bcm5719-llvm-29b9f477964e204c9f018dff77f6f889773f64d9.zip
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
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp9
1 files changed, 3 insertions, 6 deletions
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<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:
OpenPOWER on IntegriCloud