Remove support for versioned debug info.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 11 Mar 2013 23:39:23 +0000 (23:39 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 11 Mar 2013 23:39:23 +0000 (23:39 +0000)
commitc0ec8a4f4db3c579dfc8c219dc39014f34260b42
tree3d6dbe6f870a716550df33934500a84409ab3edf
parent6643868498043d373384e0befaff3b5a8a8574f7
Remove support for versioned debug info.

Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176838 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/IR/AsmWriter.cpp
lib/IR/DebugInfo.cpp