mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-21 10:42:35 +00:00
[lld-macho][nfc] clang-format
This commit is contained in:
parent
28a2102ee3
commit
11a0d23650
@ -240,8 +240,7 @@ static std::vector<ArchiveMember> getArchiveMembers(MemoryBufferRef mb) {
|
||||
static DenseMap<StringRef, ArchiveFile *> loadedArchives;
|
||||
|
||||
static InputFile *addFile(StringRef path, bool forceLoadArchive,
|
||||
bool isExplicit = true,
|
||||
bool isBundleLoader = false) {
|
||||
bool isExplicit = true, bool isBundleLoader = false) {
|
||||
Optional<MemoryBufferRef> buffer = readFile(path);
|
||||
if (!buffer)
|
||||
return nullptr;
|
||||
@ -308,7 +307,7 @@ static InputFile *addFile(StringRef path, bool forceLoadArchive,
|
||||
case file_magic::macho_dynamically_linked_shared_lib:
|
||||
case file_magic::macho_dynamically_linked_shared_lib_stub:
|
||||
case file_magic::tapi_file:
|
||||
if (DylibFile * dylibFile = loadDylib(mbref)) {
|
||||
if (DylibFile *dylibFile = loadDylib(mbref)) {
|
||||
if (isExplicit)
|
||||
dylibFile->explicitlyLinked = true;
|
||||
newFile = dylibFile;
|
||||
|
@ -547,11 +547,10 @@ template <class NList>
|
||||
static macho::Symbol *createAbsolute(const NList &sym, InputFile *file,
|
||||
StringRef name) {
|
||||
if (sym.n_type & N_EXT) {
|
||||
return symtab->addDefined(name, file, nullptr, sym.n_value, /*size=*/0,
|
||||
/*isWeakDef=*/false, sym.n_type & N_PEXT,
|
||||
sym.n_desc & N_ARM_THUMB_DEF,
|
||||
/*isReferencedDynamically=*/false,
|
||||
sym.n_desc & N_NO_DEAD_STRIP);
|
||||
return symtab->addDefined(
|
||||
name, file, nullptr, sym.n_value, /*size=*/0,
|
||||
/*isWeakDef=*/false, sym.n_type & N_PEXT, sym.n_desc & N_ARM_THUMB_DEF,
|
||||
/*isReferencedDynamically=*/false, sym.n_desc & N_NO_DEAD_STRIP);
|
||||
}
|
||||
return make<Defined>(name, file, nullptr, sym.n_value, /*size=*/0,
|
||||
/*isWeakDef=*/false,
|
||||
|
@ -165,9 +165,7 @@ public:
|
||||
|
||||
unsigned numReferencedSymbols = 0;
|
||||
|
||||
bool isReferenced() const {
|
||||
return numReferencedSymbols > 0;
|
||||
}
|
||||
bool isReferenced() const { return numReferencedSymbols > 0; }
|
||||
|
||||
// An executable can be used as a bundle loader that will load the output
|
||||
// file being linked, and that contains symbols referenced, but not
|
||||
|
Loading…
x
Reference in New Issue
Block a user