PR libstdc++/87308 adjust regex used in std::any pretty printer
[official-gcc.git] / gcc / d / dmd / objc.h
blobcc1f0981413dfa24a95d051b34361c67941a242b
2 /* Compiler implementation of the D programming language
3 * Copyright (C) 2015-2018 by The D Language Foundation, All Rights Reserved
4 * written by Michel Fortin
5 * http://www.digitalmars.com
6 * Distributed under the Boost Software License, Version 1.0.
7 * http://www.boost.org/LICENSE_1_0.txt
8 * https://github.com/dlang/dmd/blob/master/src/dmd/objc.h
9 */
11 #pragma once
13 #include "root/root.h"
14 #include "root/stringtable.h"
16 class Identifier;
17 class FuncDeclaration;
18 class ClassDeclaration;
19 class InterfaceDeclaration;
20 struct Scope;
21 class StructDeclaration;
23 struct ObjcSelector
25 static StringTable stringtable;
26 static StringTable vTableDispatchSelectors;
27 static int incnum;
29 const char *stringvalue;
30 size_t stringlen;
31 size_t paramCount;
33 static void _init();
35 ObjcSelector(const char *sv, size_t len, size_t pcount);
37 static ObjcSelector *lookup(const char *s);
38 static ObjcSelector *lookup(const char *s, size_t len, size_t pcount);
40 static ObjcSelector *create(FuncDeclaration *fdecl);
43 class Objc
45 public:
46 static void _init();
48 virtual void setObjc(ClassDeclaration* cd) = 0;
49 virtual void setObjc(InterfaceDeclaration*) = 0;
50 virtual void setSelector(FuncDeclaration*, Scope* sc) = 0;
51 virtual void validateSelector(FuncDeclaration* fd) = 0;
52 virtual void checkLinkage(FuncDeclaration* fd) = 0;