From 6186fb2cd008ea9445ebc1dddced644cdbaeead5 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 6 Apr 2015 23:27:00 +0000 Subject: Transforms: Stop using DIDescriptor::is*() and auto-casting Same as r234255, but for lib/Analysis and lib/Transforms. llvm-svn: 234257 --- llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp') diff --git a/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp b/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp index cbc4700dd1a..38007bbcd3f 100644 --- a/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp +++ b/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp @@ -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(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(T)) { if (auto *S = CT.getIdentifier()) O << " (identifier: '" << S->getString() << "')"; } -- cgit v1.2.3