comparison clang/lib/CodeGen/CGObjCRuntime.h @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 0572611fdcc8
children c4bab56944e8
comparison
equal deleted inserted replaced
220:42394fc6a535 221:79ff65ed7e25
18 #include "CGCall.h" 18 #include "CGCall.h"
19 #include "CGCleanup.h" 19 #include "CGCleanup.h"
20 #include "CGValue.h" 20 #include "CGValue.h"
21 #include "clang/AST/DeclObjC.h" 21 #include "clang/AST/DeclObjC.h"
22 #include "clang/Basic/IdentifierTable.h" // Selector 22 #include "clang/Basic/IdentifierTable.h" // Selector
23 #include "llvm/ADT/UniqueVector.h"
23 24
24 namespace llvm { 25 namespace llvm {
25 class Constant; 26 class Constant;
26 class Function; 27 class Function;
27 class Module; 28 class Module;
113 llvm::FunctionCallee syncExitFn); 114 llvm::FunctionCallee syncExitFn);
114 115
115 public: 116 public:
116 virtual ~CGObjCRuntime(); 117 virtual ~CGObjCRuntime();
117 118
119 std::string getSymbolNameForMethod(const ObjCMethodDecl *method,
120 bool includeCategoryName = true);
121
118 /// Generate the function required to register all Objective-C components in 122 /// Generate the function required to register all Objective-C components in
119 /// this compilation unit with the runtime library. 123 /// this compilation unit with the runtime library.
120 virtual llvm::Function *ModuleInitFunction() = 0; 124 virtual llvm::Function *ModuleInitFunction() = 0;
121 125
122 /// Get a selector for the specified name and type values. 126 /// Get a selector for the specified name and type values.
199 bool isCategoryImpl, 203 bool isCategoryImpl,
200 llvm::Value *Self, 204 llvm::Value *Self,
201 bool IsClassMessage, 205 bool IsClassMessage,
202 const CallArgList &CallArgs, 206 const CallArgList &CallArgs,
203 const ObjCMethodDecl *Method = nullptr) = 0; 207 const ObjCMethodDecl *Method = nullptr) = 0;
208
209 /// Walk the list of protocol references from a class, category or
210 /// protocol to traverse the DAG formed from it's inheritance hierarchy. Find
211 /// the list of protocols that ends each walk at either a runtime
212 /// protocol or a non-runtime protocol with no parents. For the common case of
213 /// just a list of standard runtime protocols this just returns the same list
214 /// that was passed in.
215 std::vector<const ObjCProtocolDecl *>
216 GetRuntimeProtocolList(ObjCProtocolDecl::protocol_iterator begin,
217 ObjCProtocolDecl::protocol_iterator end);
204 218
205 /// Emit the code to return the named protocol as an object, as in a 219 /// Emit the code to return the named protocol as an object, as in a
206 /// \@protocol expression. 220 /// \@protocol expression.
207 virtual llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF, 221 virtual llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
208 const ObjCProtocolDecl *OPD) = 0; 222 const ObjCProtocolDecl *OPD) = 0;