summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-04-22 22:59:24 +0000
committerRui Ueyama <ruiu@google.com>2016-04-22 22:59:24 +0000
commit4a46539c24736a60c9115fcc6d8f1c26ff8a4693 (patch)
tree2edd4fce38ee0b3bc802c5a48bb297ec4a4aa692
parente12fd0fc2c7c806f4d734d58cf48c05c2e9a12bb (diff)
downloadbcm5719-llvm-4a46539c24736a60c9115fcc6d8f1c26ff8a4693.tar.gz
bcm5719-llvm-4a46539c24736a60c9115fcc6d8f1c26ff8a4693.zip
Devirtualize ScriptParserBase. NFC.
ScriptParserBase class is a container of collection of various methods to parse linker script-ish text. It had a virtual method `run` to run the parser. But we don't have to enforce its descendents to implement that. It's up to them. This patch removes pure virtual function `run`. llvm-svn: 267246
-rw-r--r--lld/ELF/LinkerScript.cpp2
-rw-r--r--lld/ELF/ScriptParser.h3
-rw-r--r--lld/ELF/SymbolListFile.cpp4
3 files changed, 3 insertions, 6 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 44246f43f9d..5fad6e1abf2 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -317,7 +317,7 @@ class elf::ScriptParser : public ScriptParserBase {
public:
ScriptParser(StringRef S, bool B) : ScriptParserBase(S), IsUnderSysroot(B) {}
- void run() override;
+ void run();
private:
void addFile(StringRef Path);
diff --git a/lld/ELF/ScriptParser.h b/lld/ELF/ScriptParser.h
index 5da20f0f092..1f4b6d1ee3e 100644
--- a/lld/ELF/ScriptParser.h
+++ b/lld/ELF/ScriptParser.h
@@ -20,9 +20,6 @@ namespace elf {
class ScriptParserBase {
public:
ScriptParserBase(StringRef S) : Input(S), Tokens(tokenize(S)) {}
- virtual ~ScriptParserBase() = default;
-
- virtual void run() = 0;
protected:
void setError(const Twine &Msg);
diff --git a/lld/ELF/SymbolListFile.cpp b/lld/ELF/SymbolListFile.cpp
index 83239339607..2c23bb47083 100644
--- a/lld/ELF/SymbolListFile.cpp
+++ b/lld/ELF/SymbolListFile.cpp
@@ -34,7 +34,7 @@ class DynamicListParser final : public ScriptParserBase {
public:
DynamicListParser(StringRef S) : ScriptParserBase(S) {}
- void run() override;
+ void run();
private:
void readGroup();
@@ -75,7 +75,7 @@ class VersionScriptParser final : public ScriptParserBase {
public:
VersionScriptParser(StringRef S) : ScriptParserBase(S) {}
- void run() override;
+ void run();
};
void VersionScriptParser::run() {
OpenPOWER on IntegriCloud