diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-06 22:32:20 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-06 22:32:20 +0000 |
commit | 44804c3f13c5922cdf1e478090d8275b6a953e8e (patch) | |
tree | 2531a78fb624e8510530e81c5523584561f198d6 /llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp | |
parent | d58de064b8eb041efab796c37986718311d0ee7a (diff) | |
download | llvm-44804c3f13c5922cdf1e478090d8275b6a953e8e.zip llvm-44804c3f13c5922cdf1e478090d8275b6a953e8e.tar.gz llvm-44804c3f13c5922cdf1e478090d8275b6a953e8e.tar.bz2 |
DebugInfo: Allow isa<> on DIDescriptor and subclasses
Allow LLVM-style casting on `DIDescriptor` and its subclasses so they
can behave more like raw pointers. I haven't bothered with tests since
I have a follow-up commit coming shortly that uses them extensively in
tree, and I'm hoping to kill `DIDescriptor` entirely before too long (so
they won't have time to bitrot).
Usage examples:
DIDescriptor D = foo();
if (DICompileUnit CU = dyn_cast<MDCompileUnit>(D))
return bar(CU);
else if (auto *SP = dyn_cast<MDSubprogram>(D))
return baz(SP);
return other(D);
llvm-svn: 234250
Diffstat (limited to 'llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp')
0 files changed, 0 insertions, 0 deletions