DebugInfo: Overload get() in DIDescriptor subclasses
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 23 Mar 2015 21:54:07 +0000 (21:54 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 23 Mar 2015 21:54:07 +0000 (21:54 +0000)
commit9b9cc2dad4f8200acdef7cc7f4a618c119932550
tree0c8a557ab4da2fc152ac360b42d99e48122ef603
parent0850871f67c2ba2fcf130f096a23921fb4caffa6
DebugInfo: Overload get() in DIDescriptor subclasses

Continue to simplify the `DIDescriptor` subclasses, so that they behave
more like raw pointers.  Remove `getRaw()`, replace it with an
overloaded `get()`, and overload the arrow and cast operators.  Two
testcases started to crash on the arrow operators with this change
because of `scope:` references that weren't real scopes.  I fixed them.
Soon I'll add verifier checks for them too.

This also adds explicit dereference operators.  Previously, the builtin
dereference against `operator MDNode *()` would have worked, but now the
builtins are ambiguous.

llvm-svn: 233030
llvm/include/llvm/IR/DebugInfo.h
llvm/lib/IR/DebugInfo.cpp
llvm/test/CodeGen/X86/2012-11-30-misched-dbg.ll
llvm/test/Transforms/Inline/debug-invoke.ll