[lld-macho][nfc] clang-format

This commit is contained in:
Jez Ng 2021-07-11 18:36:59 -04:00
parent 28a2102ee3
commit 11a0d23650
3 changed files with 7 additions and 11 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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