1//===- ObjC.h ---------------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLD_MACHO_OBJC_H
10#define LLD_MACHO_OBJC_H
11
12#include "llvm/Support/MemoryBuffer.h"
13
14namespace lld::macho {
15
16namespace objc {
17
18namespace symbol_names {
19constexpr const char klass[] = "_OBJC_CLASS_$_";
20constexpr const char klassPropList[] = "__OBJC_$_CLASS_PROP_LIST_";
21
22constexpr const char metaclass[] = "_OBJC_METACLASS_$_";
23constexpr const char ehtype[] = "_OBJC_EHTYPE_$_";
24constexpr const char ivar[] = "_OBJC_IVAR_$_";
25constexpr const char instanceMethods[] = "__OBJC_$_INSTANCE_METHODS_";
26constexpr const char classMethods[] = "__OBJC_$_CLASS_METHODS_";
27constexpr const char listProprieties[] = "__OBJC_$_PROP_LIST_";
28
29constexpr const char category[] = "__OBJC_$_CATEGORY_";
30constexpr const char categoryInstanceMethods[] =
31 "__OBJC_$_CATEGORY_INSTANCE_METHODS_";
32constexpr const char categoryClassMethods[] =
33 "__OBJC_$_CATEGORY_CLASS_METHODS_";
34constexpr const char categoryProtocols[] = "__OBJC_CATEGORY_PROTOCOLS_$_";
35} // namespace symbol_names
36
37// Check for duplicate method names within related categories / classes.
38void checkCategories();
39void mergeCategories();
40
41void doCleanup();
42} // namespace objc
43
44bool hasObjCSection(llvm::MemoryBufferRef);
45
46} // namespace lld::macho
47
48#endif
49

source code of lld/MachO/ObjC.h