llvm/clang/lib/APINotes/APINotesFormat.h

//===-- APINotesWriter.h - API Notes Writer ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_LIB_APINOTES_APINOTESFORMAT_H
#define LLVM_CLANG_LIB_APINOTES_APINOTESFORMAT_H

#include "clang/APINotes/Types.h"
#include "llvm/ADT/PointerEmbeddedInt.h"
#include "llvm/Bitcode/BitcodeConvenience.h"

namespace clang {
namespace api_notes {
/// Magic number for API notes files.
const unsigned char API_NOTES_SIGNATURE[] =;

/// API notes file major version number.
const uint16_t VERSION_MAJOR =;

/// API notes file minor version number.
///
/// When the format changes IN ANY WAY, this number should be incremented.
const uint16_t VERSION_MINOR =; // fields

const uint8_t kSwiftCopyable =;
const uint8_t kSwiftNonCopyable =;

IdentifierID;
IdentifierIDField;

SelectorID;
SelectorIDField;

/// The various types of blocks that can occur within a API notes file.
///
/// These IDs must \em not be renumbered or reordered without incrementing
/// VERSION_MAJOR.
enum BlockID {};

namespace control_block {
// These IDs must \em not be renumbered or reordered without incrementing
// VERSION_MAJOR.
enum {};

MetadataLayout;

ModuleNameLayout;

ModuleOptionsLayout;

SourceFileLayout;
} // namespace control_block

namespace identifier_block {
enum {};

IdentifierDataLayout;
} // namespace identifier_block

namespace context_block {
enum {};

ContextIDLayout;

ContextInfoLayout;
} // namespace context_block

namespace objc_property_block {
enum {};

ObjCPropertyDataLayout;
} // namespace objc_property_block

namespace objc_method_block {
enum {};

ObjCMethodDataLayout;
} // namespace objc_method_block

namespace cxx_method_block {
enum {};

CXXMethodDataLayout;
} // namespace cxx_method_block

namespace field_block {
enum {};

FieldDataLayout;
} // namespace field_block

namespace objc_selector_block {
enum {};

ObjCSelectorDataLayout;
} // namespace objc_selector_block

namespace global_variable_block {
enum {};

GlobalVariableDataLayout;
} // namespace global_variable_block

namespace global_function_block {
enum {};

GlobalFunctionDataLayout;
} // namespace global_function_block

namespace tag_block {
enum {};

TagDataLayout;
} // namespace tag_block

namespace typedef_block {
enum {};

TypedefDataLayout;
} // namespace typedef_block

namespace enum_constant_block {
enum {};

EnumConstantDataLayout;
} // namespace enum_constant_block

/// A stored Objective-C selector.
struct StoredObjCSelector {};

/// A stored Objective-C or C++ context, represented by the ID of its parent
/// context, the kind of this context (Objective-C class / C++ namespace / etc),
/// and the ID of this context.
struct ContextTableKey {};

inline bool operator==(const ContextTableKey &lhs, const ContextTableKey &rhs) {}

/// A stored Objective-C or C++ declaration, represented by the ID of its parent
/// context, and the name of the declaration.
struct SingleDeclTableKey {};

inline bool operator==(const SingleDeclTableKey &lhs,
                       const SingleDeclTableKey &rhs) {}

} // namespace api_notes
} // namespace clang

namespace llvm {
template <> struct DenseMapInfo<clang::api_notes::StoredObjCSelector> {};

template <> struct DenseMapInfo<clang::api_notes::ContextTableKey> {};

template <> struct DenseMapInfo<clang::api_notes::SingleDeclTableKey> {};

} // namespace llvm

#endif