summaryrefslogtreecommitdiff
path: root/src/passes/DebugLocationPropagation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/DebugLocationPropagation.cpp')
-rw-r--r--src/passes/DebugLocationPropagation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/DebugLocationPropagation.cpp b/src/passes/DebugLocationPropagation.cpp
index 07ae53faa..e2d1ac50f 100644
--- a/src/passes/DebugLocationPropagation.cpp
+++ b/src/passes/DebugLocationPropagation.cpp
@@ -64,6 +64,10 @@ struct DebugLocationPropagation
if (auto it = locs.find(previous); it != locs.end()) {
locs[curr] = it->second;
}
+ } else if (self->getFunction()->prologLocation.size()) {
+ // Instructions may inherit their locations from the function
+ // prolog.
+ locs[curr] = *self->getFunction()->prologLocation.begin();
}
}
expressionStack.push_back(curr);