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

@@ -103,8 +103,7 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
if (!T.getName().empty())
O << ' ' << T.getName();
printFile(O, T.getFilename(), T.getDirectory(), T.getLineNumber());
if (T.isBasicType()) {
DIBasicType BT(T.get());
if (DIBasicType BT = dyn_cast<MDBasicType>(T)) {
O << " ";
if (const char *Encoding =
dwarf::AttributeEncodingString(BT.getEncoding()))
@@ -118,8 +117,7 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
else
O << "unknown-tag(" << T.getTag() << ")";
}
if (T.isCompositeType()) {
DICompositeType CT(T.get());
if (DICompositeType CT = dyn_cast<MDCompositeType>(T)) {
if (auto *S = CT.getIdentifier())
O << " (identifier: '" << S->getString() << "')";
}