IR: Avoid DIScopeRef in DIImportedEntity::getEntity()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 18 Feb 2015 19:39:36 +0000 (19:39 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 18 Feb 2015 19:39:36 +0000 (19:39 +0000)
commit1cfad01081d0a846107995d498c75a2c8a954eac
treed88b9cab51c1efe55ddf1e9aaf12ba65619570d2
parent7994fa0a0e9307a74615eaa105ab035a8505f48a
IR: Avoid DIScopeRef in DIImportedEntity::getEntity()

`DIImportedEntity::getEntity()` currently returns a `DIScopeRef`, but
the nodes it references aren't always `DIScope`s.  In particular, it can
reference global variables.

Introduce `DIDescriptorRef` to avoid the lie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229733 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfo.h
lib/IR/DebugInfo.cpp