diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-09-23 18:06:51 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-09-23 18:06:51 +0000 |
| commit | 0120e3f278a5a9db6fa7b0cad258b209b409fa09 (patch) | |
| tree | 75f3a57b6423ca6b15ce0cf110f2e42b7d2d8857 /lld/ELF/LinkerScript.cpp | |
| parent | c13ea88a14519c9c8c02aa1ee00485cfcf7de11c (diff) | |
| download | bcm5719-llvm-0120e3f278a5a9db6fa7b0cad258b209b409fa09.tar.gz bcm5719-llvm-0120e3f278a5a9db6fa7b0cad258b209b409fa09.zip | |
Simplify. NFC.
llvm-svn: 282268
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 646dbbd9500..8227182d9ab 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1085,20 +1085,12 @@ void ScriptParser::readSections() { static int precedence(StringRef Op) { return StringSwitch<int>(Op) - .Case("*", 5) - .Case("/", 5) - .Case("+", 4) - .Case("-", 4) - .Case("<<", 3) - .Case(">>", 3) - .Case("<", 2) - .Case(">", 2) - .Case(">=", 2) - .Case("<=", 2) - .Case("==", 2) - .Case("!=", 2) - .Case("&", 1) - .Case("|", 1) + .Cases("*", "/", 5) + .Cases("+", "-", 4) + .Cases("<<", ">>", 3) + .Cases("<", "<=", ">", ">=", 2) // Cases takes up to four cases. + .Cases("==", "!=", 2) + .Cases("&", "|", 1) .Default(-1); } |

