summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/DebugLocationPropagation.cpp4
-rw-r--r--src/passes/Print.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/passes/DebugLocationPropagation.cpp b/src/passes/DebugLocationPropagation.cpp
index e2d1ac50f..b2eb8fa83 100644
--- a/src/passes/DebugLocationPropagation.cpp
+++ b/src/passes/DebugLocationPropagation.cpp
@@ -64,10 +64,10 @@ struct DebugLocationPropagation
if (auto it = locs.find(previous); it != locs.end()) {
locs[curr] = it->second;
}
- } else if (self->getFunction()->prologLocation.size()) {
+ } else if (self->getFunction()->prologLocation) {
// Instructions may inherit their locations from the function
// prolog.
- locs[curr] = *self->getFunction()->prologLocation.begin();
+ locs[curr] = *self->getFunction()->prologLocation;
}
}
expressionStack.push_back(curr);
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 4ca40f35a..5f2d1cc3d 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -3060,8 +3060,8 @@ void PrintSExpression::visitDefinedFunction(Function* curr) {
currFunction = curr;
lastPrintedLocation = std::nullopt;
lastPrintIndent = 0;
- if (currFunction->prologLocation.size()) {
- printDebugLocation(*currFunction->prologLocation.begin());
+ if (currFunction->prologLocation) {
+ printDebugLocation(*currFunction->prologLocation);
}
handleSignature(curr, true);
incIndent();
@@ -3095,14 +3095,14 @@ void PrintSExpression::visitDefinedFunction(Function* curr) {
}
assert(controlFlowDepth == 0);
}
- if (currFunction->epilogLocation.size()) {
+ if (currFunction->epilogLocation) {
// Print last debug location: mix of decIndent and printDebugLocation
// logic.
doIndent(o, indent);
if (!minify) {
indent--;
}
- printDebugLocation(*currFunction->epilogLocation.begin());
+ printDebugLocation(*currFunction->epilogLocation);
o << ')';
} else {
decIndent();