diff options
Diffstat (limited to 'contrib/llvm-project/lld/MachO/InputFiles.h')
-rw-r--r-- | contrib/llvm-project/lld/MachO/InputFiles.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/llvm-project/lld/MachO/InputFiles.h b/contrib/llvm-project/lld/MachO/InputFiles.h index ea6802814e4c..89172922a0a7 100644 --- a/contrib/llvm-project/lld/MachO/InputFiles.h +++ b/contrib/llvm-project/lld/MachO/InputFiles.h @@ -219,10 +219,13 @@ public: explicit DylibFile(const llvm::MachO::InterfaceFile &interface, DylibFile *umbrella, bool isBundleLoader, bool explicitlyLinked); + explicit DylibFile(DylibFile *umbrella); void parseLoadCommands(MemoryBufferRef mb); void parseReexports(const llvm::MachO::InterfaceFile &interface); bool isReferenced() const { return numReferencedSymbols > 0; } + bool isExplicitlyLinked() const; + void setExplicitlyLinked() { explicitlyLinked = true; } static bool classof(const InputFile *f) { return f->kind() == DylibKind; } @@ -239,14 +242,26 @@ public: bool forceNeeded = false; bool forceWeakImport = false; bool deadStrippable = false; - bool explicitlyLinked = false; + +private: + bool explicitlyLinked = false; // Access via isExplicitlyLinked(). + +public: // An executable can be used as a bundle loader that will load the output // file being linked, and that contains symbols referenced, but not // implemented in the bundle. When used like this, it is very similar // to a dylib, so we've used the same class to represent it. bool isBundleLoader; + // Synthetic Dylib objects created by $ld$previous symbols in this dylib. + // Usually empty. These synthetic dylibs won't have synthetic dylibs + // themselves. + SmallVector<DylibFile *, 2> extraDylibs; + private: + DylibFile *getSyntheticDylib(StringRef installName, uint32_t currentVersion, + uint32_t compatVersion); + bool handleLDSymbol(StringRef originalName); void handleLDPreviousSymbol(StringRef name, StringRef originalName); void handleLDInstallNameSymbol(StringRef name, StringRef originalName); |