aboutsummaryrefslogtreecommitdiff
path: root/include/lld/Core/SharedLibraryFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lld/Core/SharedLibraryFile.h')
-rw-r--r--include/lld/Core/SharedLibraryFile.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/lld/Core/SharedLibraryFile.h b/include/lld/Core/SharedLibraryFile.h
index a2907287862d..53bf967b0236 100644
--- a/include/lld/Core/SharedLibraryFile.h
+++ b/include/lld/Core/SharedLibraryFile.h
@@ -27,29 +27,34 @@ public:
/// Check if the shared library exports a symbol with the specified name.
/// If so, return a SharedLibraryAtom which represents that exported
/// symbol. Otherwise return nullptr.
- virtual const SharedLibraryAtom *exports(StringRef name,
- bool dataSymbolOnly) const = 0;
+ virtual OwningAtomPtr<SharedLibraryAtom> exports(StringRef name) const = 0;
- // Returns DSO name. It's the soname (ELF), the install name (MachO) or
- // the import name (Windows).
+ // Returns the install name.
virtual StringRef getDSOName() const = 0;
- const AtomVector<DefinedAtom> &defined() const override {
+ const AtomRange<DefinedAtom> defined() const override {
return _definedAtoms;
}
- const AtomVector<UndefinedAtom> &undefined() const override {
+ const AtomRange<UndefinedAtom> undefined() const override {
return _undefinedAtoms;
}
- const AtomVector<SharedLibraryAtom> &sharedLibrary() const override {
+ const AtomRange<SharedLibraryAtom> sharedLibrary() const override {
return _sharedLibraryAtoms;
}
- const AtomVector<AbsoluteAtom> &absolute() const override {
+ const AtomRange<AbsoluteAtom> absolute() const override {
return _absoluteAtoms;
}
+ void clearAtoms() override {
+ _definedAtoms.clear();
+ _undefinedAtoms.clear();
+ _sharedLibraryAtoms.clear();
+ _absoluteAtoms.clear();
+ }
+
protected:
/// only subclasses of SharedLibraryFile can be instantiated
explicit SharedLibraryFile(StringRef path) : File(path, kindSharedLibrary) {}