diff options
Diffstat (limited to 'src/ir/debug.h')
-rw-r--r-- | src/ir/debug.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/debug.h b/src/ir/debug.h index 6dfd379d6..04838137e 100644 --- a/src/ir/debug.h +++ b/src/ir/debug.h @@ -27,6 +27,10 @@ inline void copyDebugInfo(Expression* origin, Expression* copy, Function* originFunc, Function* copyFunc) { + if (originFunc->debugLocations.empty()) { + return; // No debug info to copy + } + struct Lister : public PostWalker<Lister, UnifiedExpressionVisitor<Lister>> { std::vector<Expression*> list; void visitExpression(Expression* curr) { list.push_back(curr); } |