forked from OSchip/llvm-project
Remove default implementations that are always overridden by subclasses.
llvm-svn: 262444
This commit is contained in:
parent
01ba8b2f7b
commit
0c23bcb252
|
@ -200,9 +200,7 @@ public:
|
|||
bool validate(raw_ostream &diagnostics);
|
||||
|
||||
/// Formats symbol name for use in error messages.
|
||||
virtual std::string demangle(StringRef symbolName) const {
|
||||
return symbolName;
|
||||
}
|
||||
virtual std::string demangle(StringRef symbolName) const = 0;
|
||||
|
||||
/// @}
|
||||
/// \name Methods used by Driver::link()
|
||||
|
@ -234,11 +232,11 @@ public:
|
|||
/// This method is called by core linking to give the Writer a chance
|
||||
/// to add file format specific "files" to set of files to be linked. This is
|
||||
/// how file format specific atoms can be added to the link.
|
||||
virtual void createImplicitFiles(std::vector<std::unique_ptr<File>> &);
|
||||
virtual void createImplicitFiles(std::vector<std::unique_ptr<File>> &) = 0;
|
||||
|
||||
/// This method is called by core linking to build the list of Passes to be
|
||||
/// run on the merged/linked graph of all input files.
|
||||
virtual void addPasses(PassManager &pm);
|
||||
virtual void addPasses(PassManager &pm) = 0;
|
||||
|
||||
/// Calls through to the writeFile() method on the specified Writer.
|
||||
///
|
||||
|
@ -250,16 +248,14 @@ public:
|
|||
|
||||
// This function is called just before the Resolver kicks in.
|
||||
// Derived classes may use it to change the list of input files.
|
||||
virtual void finalizeInputFiles() {}
|
||||
virtual void finalizeInputFiles() = 0;
|
||||
|
||||
/// Callback invoked for each file the Resolver decides we are going to load.
|
||||
/// This can be used to update context state based on the file, and emit
|
||||
/// errors for any differences between the context state and a loaded file.
|
||||
/// For example, we can error if we try to load a file which is a different
|
||||
/// arch from that being linked.
|
||||
virtual std::error_code handleLoadedFile(File &file) {
|
||||
return std::error_code();
|
||||
}
|
||||
virtual std::error_code handleLoadedFile(File &file) = 0;
|
||||
|
||||
/// @}
|
||||
protected:
|
||||
|
|
|
@ -33,11 +33,6 @@ std::error_code LinkingContext::writeFile(const File &linkedFile) const {
|
|||
return this->writer().writeFile(linkedFile, _outputPath);
|
||||
}
|
||||
|
||||
void LinkingContext::createImplicitFiles(
|
||||
std::vector<std::unique_ptr<File>> &result) {
|
||||
this->writer().createImplicitFiles(result);
|
||||
}
|
||||
|
||||
std::unique_ptr<File> LinkingContext::createEntrySymbolFile() const {
|
||||
return createEntrySymbolFile("<command line option -e>");
|
||||
}
|
||||
|
@ -77,6 +72,4 @@ void LinkingContext::createInternalFiles(
|
|||
result.push_back(std::move(file));
|
||||
}
|
||||
|
||||
void LinkingContext::addPasses(PassManager &pm) {}
|
||||
|
||||
} // end namespace lld
|
||||
|
|
Loading…
Reference in New Issue