[lld] r233441 - Remove virtual from some ELFLinkingContext member functions.
Rui Ueyama
ruiu at google.com
Fri Mar 27 15:47:44 PDT 2015
Author: ruiu
Date: Fri Mar 27 17:47:44 2015
New Revision: 233441
URL: http://llvm.org/viewvc/llvm-project?rev=233441&view=rev
Log:
Remove virtual from some ELFLinkingContext member functions.
I expected that these functions are overridden somewhere in the LLD
code base, but they are actually not. Removing virtual for readability
(and performance).
Modified:
lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h
Modified: lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h?rev=233441&r1=233440&r2=233441&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h Fri Mar 27 17:47:44 2015
@@ -102,7 +102,7 @@ public:
/// \brief Does the linker allow dynamic libraries to be linked with?
/// This is true when the output mode of the executable is set to be
/// having NMAGIC/OMAGIC
- virtual bool allowLinkWithDynamicLibraries() const {
+ bool allowLinkWithDynamicLibraries() const {
if (_outputMagic == OutputMagic::NMAGIC ||
_outputMagic == OutputMagic::OMAGIC || _noAllowDynamicLibraries)
return false;
@@ -127,19 +127,17 @@ public:
}
/// \brief The dynamic linker path set by the --dynamic-linker option
- virtual StringRef getInterpreter() const {
+ StringRef getInterpreter() const {
if (_dynamicLinkerArg)
return _dynamicLinkerPath;
return getDefaultInterpreter();
}
/// \brief Does the output have dynamic sections.
- virtual bool isDynamic() const;
+ bool isDynamic() const;
/// \brief Are we creating a shared library?
- virtual bool isDynamicLibrary() const {
- return _outputELFType == llvm::ELF::ET_DYN;
- }
+ bool isDynamicLibrary() const { return _outputELFType == llvm::ELF::ET_DYN; }
/// \brief Is the relocation a relative relocation
virtual bool isRelativeReloc(const Reference &r) const;
@@ -177,10 +175,10 @@ public:
/// or -n in the command line
/// Set OMAGIC output kind when the linker specifies --omagic
/// or -N in the command line
- virtual void setOutputMagic(OutputMagic magic) { _outputMagic = magic; }
+ void setOutputMagic(OutputMagic magic) { _outputMagic = magic; }
/// \brief Disallow dynamic libraries during linking
- virtual void setNoAllowDynamicLibraries() { _noAllowDynamicLibraries = true; }
+ void setNoAllowDynamicLibraries() { _noAllowDynamicLibraries = true; }
/// Searches directories for a match on the input File
ErrorOr<StringRef> searchLibrary(StringRef libName) const;
More information about the llvm-commits
mailing list