aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 22e2455..58e180c 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -83,15 +83,17 @@ static cl::opt<unsigned> NonGlobalValueMaxNameSize(
void Function::convertToNewDbgValues() {
IsNewDbgInfoFormat = true;
+ bool HasNoDebugInfo = getSubprogram() == nullptr;
for (auto &BB : *this) {
- BB.convertToNewDbgValues();
+ BB.convertToNewDbgValues(HasNoDebugInfo);
}
}
void Function::convertFromNewDbgValues() {
IsNewDbgInfoFormat = false;
+ bool HasNoDebugInfo = getSubprogram() == nullptr;
for (auto &BB : *this) {
- BB.convertFromNewDbgValues();
+ BB.convertFromNewDbgValues(HasNoDebugInfo);
}
}