DebugInfo: Remove DITypedArray<>, replace with typedefs
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 04:14:33 +0000 (04:14 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 04:14:33 +0000 (04:14 +0000)
commit92d1a5236268c5e1a7878bd0788adf7393658c0d
treec93ab989740d1ddb01b5713800d37d7de077a83e
parentb135631d2e92dbe17738b5c6aadcfcaa2298a98a
DebugInfo: Remove DITypedArray<>, replace with typedefs

Replace all uses of `DITypedArray<>` with `MDTupleTypedArrayWrapper<>`
and `MDTypeRefArray`.  The APIs are completely different, but the
provided functionality is the same: treat an `MDTuple` as if it's an
array of a particular element type.

To simplify this patch a bit, I've temporarily typedef'ed
`DebugNodeArray` to `DIArray` and `MDTypeRefArray` to `DITypeArray`.
I've also temporarily conditionalized the accessors to check for null --
eventually these should be changed to asserts and the callers should
check for null themselves.

There's a tiny accompanying patch to clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234290 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/IR/DebugInfo.h
include/llvm/IR/DebugInfoMetadata.h
include/llvm/IR/Metadata.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
lib/IR/DIBuilder.cpp
lib/IR/DebugInfo.cpp
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/Utils/CloneFunction.cpp
unittests/Transforms/Utils/Cloning.cpp