Skip to content

Commit 0862049

Browse files
committed
A couple of variables can be const in Transforms/Yk/ControlPoint.cpp
Detected by clangd.
1 parent 1ee7171 commit 0862049

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Yk/ControlPoint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CallInst *findControlPointCall(Module &M) {
8484
return nullptr;
8585

8686
// Find the call site of `yk_mt_control_point()`.
87-
Value::user_iterator U = CtrlPoint->user_begin();
87+
const Value::user_iterator U = CtrlPoint->user_begin();
8888
if (U == CtrlPoint->user_end())
8989
return nullptr;
9090

@@ -130,7 +130,7 @@ class YkControlPoint : public ModulePass {
130130

131131
// Find all live variables just before the call to the control point.
132132
LivenessAnalysis LA(OldCtrlPointCall->getFunction());
133-
std::set<Value *> LiveVals = LA.getLiveVarsBefore(OldCtrlPointCall);
133+
const std::set<Value *> LiveVals = LA.getLiveVarsBefore(OldCtrlPointCall);
134134
if (LiveVals.size() == 0) {
135135
Context.emitError(
136136
"The interpreter loop has no live variables!\n"

0 commit comments

Comments
 (0)