mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.
Patch produced by
for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
103 lines
3.8 KiB
C++
103 lines
3.8 KiB
C++
//===- ExtendedIntefaceFile.h - TAPI Extended Interface File ----*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// A generic and abstract interface representation for linkable objects.
|
|
/// This could be an MachO executable, bundle, dylib, or text-based stub
|
|
/// file.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef TAPI_CORE_EXTENDED_INTERFACE_FILE_H
|
|
#define TAPI_CORE_EXTENDED_INTERFACE_FILE_H
|
|
|
|
#include "Architecture.h"
|
|
#include "ArchitectureSet.h"
|
|
#include "File.h"
|
|
#include "InterfaceFile.h"
|
|
#include "InterfaceFileBase.h"
|
|
#include "STLExtras.h"
|
|
#include "XPI.h"
|
|
#include "XPISet.h"
|
|
#include "Defines.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "llvm/ADT/iterator.h"
|
|
#include "llvm/Support/Error.h"
|
|
|
|
TAPI_NAMESPACE_INTERNAL_BEGIN
|
|
|
|
class ExtendedInterfaceFile : public InterfaceFileBase {
|
|
public:
|
|
static bool classof(const File *file) {
|
|
return file->kind() == File::Kind::ExtendedInterfaceFile;
|
|
}
|
|
|
|
ExtendedInterfaceFile()
|
|
: InterfaceFileBase(File::Kind::ExtendedInterfaceFile),
|
|
_symbols(new XPISet), _undefineds(new XPISet) {}
|
|
ExtendedInterfaceFile(std::unique_ptr<XPISet> &&symbols)
|
|
: InterfaceFileBase(File::Kind::ExtendedInterfaceFile),
|
|
_symbols(std::move(symbols)), _undefineds(new XPISet) {}
|
|
|
|
void addSymbol(XPIKind kind, StringRef name, ArchitectureSet archs,
|
|
SymbolFlags flags = SymbolFlags::None,
|
|
XPIAccess access = XPIAccess::Exported);
|
|
|
|
ObjCClass *addObjCClass(StringRef name, ArchitectureSet archs,
|
|
XPIAccess access = XPIAccess::Exported,
|
|
ObjCClass *superClass = nullptr);
|
|
ObjCSelector *addObjCSelector(ObjCContainer *container, StringRef name,
|
|
ArchitectureSet archs,
|
|
bool isInstanceMethod = false,
|
|
bool isDynamic = false,
|
|
XPIAccess access = XPIAccess::Exported);
|
|
ObjCCategory *addObjCCategory(ObjCClass *baseClass, StringRef name,
|
|
ArchitectureSet archs,
|
|
XPIAccess access = XPIAccess::Exported);
|
|
ObjCProtocol *addObjCProtocol(StringRef name, ArchitectureSet archs,
|
|
XPIAccess access = XPIAccess::Exported);
|
|
|
|
void addUndefinedSymbol(XPIKind kind, StringRef name, ArchitectureSet archs,
|
|
SymbolFlags flags = SymbolFlags::None);
|
|
|
|
using const_symbol_range = XPISet::const_symbol_range;
|
|
using const_export_range = XPISet::const_export_range;
|
|
using const_selector_range = XPISet::const_selector_range;
|
|
|
|
const_symbol_range symbols() const { return _symbols->symbols(); }
|
|
const_export_range exports() const { return _symbols->exports(); }
|
|
const_selector_range selectors() const { return _symbols->selectors(); }
|
|
const_symbol_range undefineds() const { return _undefineds->symbols(); }
|
|
|
|
const XPISet &getSymbolSet() const { return *_symbols; }
|
|
|
|
bool contains(XPIKind kind, StringRef name,
|
|
XPI const **result = nullptr) const;
|
|
|
|
llvm::Expected<std::unique_ptr<ExtendedInterfaceFile>>
|
|
merge(const ExtendedInterfaceFile *otherInterface,
|
|
bool allowArchitectureMerges = false) const;
|
|
|
|
bool removeSymbol(XPIKind kind, StringRef name);
|
|
bool removeSymbol(SymbolKind kind, StringRef name);
|
|
|
|
void printSymbols(ArchitectureSet archs) const;
|
|
|
|
private:
|
|
void printSymbolsForArch(Architecture arch) const;
|
|
|
|
protected:
|
|
std::unique_ptr<XPISet> _symbols;
|
|
std::unique_ptr<XPISet> _undefineds;
|
|
};
|
|
|
|
TAPI_NAMESPACE_INTERNAL_END
|
|
|
|
#endif // TAPI_CORE_EXTENDED_INTERFACE_FILE_H
|