OBS-URL: https://build.opensuse.org/package/show/devel:tools:statica/klee?expand=0&rev=37
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
From: Jiri Slaby <jirislaby@gmail.com>
|
|
Date: Mon, 15 Jan 2018 10:24:48 +0100
|
|
Subject: llvm50: use auto variable instead of SwitchInst::CaseIt
|
|
Patch-mainline: no
|
|
|
|
llvm50 changed the semantics of SwitchInst::CaseIt and started using
|
|
"auto" variable type. So use it here too for all versions.
|
|
|
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
---
|
|
lib/Core/Executor.cpp | 3 +--
|
|
lib/Module/LowerSwitch.cpp | 2 +-
|
|
2 files changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
|
index be92b16a459d..d836598927ce 100644
|
|
--- a/lib/Core/Executor.cpp
|
|
+++ b/lib/Core/Executor.cpp
|
|
@@ -1553,8 +1553,7 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
|
std::map<ref<Expr>, BasicBlock *> expressionOrder;
|
|
|
|
// Iterate through all non-default cases and order them by expressions
|
|
- for (SwitchInst::CaseIt i = si->case_begin(), e = si->case_end(); i != e;
|
|
- ++i) {
|
|
+ for (auto i : si->cases()) {
|
|
ref<Expr> value = evalConstant(i.getCaseValue());
|
|
|
|
BasicBlock *caseSuccessor = i.getCaseSuccessor();
|
|
diff --git a/lib/Module/LowerSwitch.cpp b/lib/Module/LowerSwitch.cpp
|
|
index 1a194245a09a..02f00a3ae94e 100644
|
|
--- a/lib/Module/LowerSwitch.cpp
|
|
+++ b/lib/Module/LowerSwitch.cpp
|
|
@@ -115,7 +115,7 @@ void LowerSwitchPass::processSwitchInst(SwitchInst *SI) {
|
|
|
|
CaseVector cases;
|
|
|
|
- for (SwitchInst::CaseIt i = SI->case_begin(), e = SI->case_end(); i != e; ++i)
|
|
+ for (auto i : SI->cases())
|
|
cases.push_back(SwitchCase(i.getCaseValue(),
|
|
i.getCaseSuccessor()));
|
|
|
|
--
|
|
2.15.1
|
|
|