summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugValues.cpp
diff options
context:
space:
mode:
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>2017-07-19 19:36:40 +0000
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>2017-07-19 19:36:40 +0000
commite018bbd83594507171bc731b2d922fe0eed64595 (patch)
treea92736795040543482116561974449e234bee852 /llvm/lib/CodeGen/LiveDebugValues.cpp
parent17b1ecfdc5b29215a9d73cee89eb85cf35f23866 (diff)
downloadbcm5719-llvm-e018bbd83594507171bc731b2d922fe0eed64595.tar.gz
bcm5719-llvm-e018bbd83594507171bc731b2d922fe0eed64595.zip
Fixing an issue with the initialization of LexicalScopes objects when mixing debug
and non-debug units. Patch by Andrea DiBiagio. Differential Revision: https://reviews.llvm.org/D35637 llvm-svn: 308513
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp
index b5e705f6455..4614ddce5e0 100644
--- a/llvm/lib/CodeGen/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues.cpp
@@ -1,4 +1,4 @@
-//===------ LiveDebugValues.cpp - Tracking Debug Value MIs ----------------===//
+//===------ LiveDebugValues.cpp - Tracking Debug Value MIs ----------------===//G
//
// The LLVM Compiler Infrastructure
//
@@ -702,6 +702,11 @@ bool LiveDebugValues::runOnMachineFunction(MachineFunction &MF) {
// LiveDebugValues will already have removed all DBG_VALUEs.
return false;
+ // Skip functions from NoDebug compilation units.
+ if (MF.getFunction()->getSubprogram()->getUnit()->getEmissionKind() ==
+ DICompileUnit::NoDebug)
+ return false;
+
TRI = MF.getSubtarget().getRegisterInfo();
TII = MF.getSubtarget().getInstrInfo();
TFI = MF.getSubtarget().getFrameLowering();
OpenPOWER on IntegriCloud