summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineDebugInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineDebugInfo.cpp b/llvm/lib/CodeGen/MachineDebugInfo.cpp
index 97fecb482ba..706beb8a8c3 100644
--- a/llvm/lib/CodeGen/MachineDebugInfo.cpp
+++ b/llvm/lib/CodeGen/MachineDebugInfo.cpp
@@ -614,6 +614,12 @@ bool CompileUnitDesc::classof(const DebugInfoDesc *D) {
///
void CompileUnitDesc::ApplyToFields(DIVisitor *Visitor) {
AnchoredDesc::ApplyToFields(Visitor);
+
+ // Handle cases out of sync with compiler.
+ if (getVersion() == 0) {
+ unsigned DebugVersion;
+ Visitor->Apply(DebugVersion);
+ }
Visitor->Apply(Language);
Visitor->Apply(FileName);
OpenPOWER on IntegriCloud