mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user