mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-21 00:24:42 +00:00
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:
@@ -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() << "')";
|
||||
}
|
||||
|
Reference in New Issue
Block a user