Transforms: Stop using DIDescriptor::is*() and auto-casting

Same as r234255, but for lib/Analysis and lib/Transforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-06 23:27:00 +00:00
parent 1545953510
commit 573ca050d2
6 changed files with 23 additions and 35 deletions

View File

@ -186,7 +186,8 @@ static void CloneDebugInfoMetadata(Function *NewFunc, const Function *OldFunc,
// Ensure that OldFunc appears in the map.
// (if it's already there it must point to NewFunc anyway)
VMap[OldFunc] = NewFunc;
DISubprogram NewSubprogram(MapMetadata(OldSubprogramMDNode, VMap));
DISubprogram NewSubprogram =
cast<MDSubprogram>(MapMetadata(OldSubprogramMDNode, VMap));
for (DICompileUnit CU : Finder.compile_units()) {
DIArray Subprograms(CU.getSubprograms());