diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-06 23:27:00 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-06 23:27:00 +0000 |
commit | 6186fb2cd008ea9445ebc1dddced644cdbaeead5 (patch) | |
tree | baf2faaf46e56cc70b74c23f9aa1cee6a02f4a7d /llvm/lib/Analysis | |
parent | c755128673b035567f712a5afea7a5f1a24bf4f2 (diff) | |
download | bcm5719-llvm-6186fb2cd008ea9445ebc1dddced644cdbaeead5.tar.gz bcm5719-llvm-6186fb2cd008ea9445ebc1dddced644cdbaeead5.zip |
Transforms: Stop using DIDescriptor::is*() and auto-casting
Same as r234255, but for lib/Analysis and lib/Transforms.
llvm-svn: 234257
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<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() << "')"; } |