AsmWriter: Cleanup debug info fields with MDFieldPrinter, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 27 Mar 2015 00:17:42 +0000 (00:17 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 27 Mar 2015 00:17:42 +0000 (00:17 +0000)
commit50b75d5804fe530a5985d25e0e19dffb166dfcc4
tree0c40e5acc65408983ec8bb609a4ce7220f16b23a
parentaff96c9829b03a18a245d14fa98f939943f40bbb
AsmWriter: Cleanup debug info fields with MDFieldPrinter, NFC

Move all the `MDNode` field helper methods into a new class,
`MDFieldPrinter`, and add helpers for integers, bools, and `DW_*`
symbolic constants.  This reduces a ton of code duplication, and makes
it more mechanical to update `AsmWriter` to print broken code in the
context of stricter accessors (like in r233322).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233337 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/AsmWriter.cpp