From 7348ddaa74814cda8de8c2e33c5a4dee3b0ca3bc Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 14 Apr 2015 02:22:36 +0000 Subject: DebugInfo: Gut DIVariable and DIGlobalVariable Gut all the non-pointer API from the variable wrappers, except an implicit conversion from `DIGlobalVariable` to `DIDescriptor`. Note that if you're updating out-of-tree code, `DIVariable` wraps `MDLocalVariable` (`MDVariable` is a common base class shared with `MDGlobalVariable`). llvm-svn: 234840 --- llvm/lib/IR/DebugInfo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/IR/DebugInfo.cpp') diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 35c4f785b2b..87cd3ef44d8 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -152,8 +152,8 @@ void DebugInfoFinder::processModule(const Module &M) { addCompileUnit(CU); for (DIGlobalVariable DIG : CU->getGlobalVariables()) { if (addGlobalVariable(DIG)) { - processScope(DIG.getContext()); - processType(DIG.getType().resolve(TypeIdentifierMap)); + processScope(DIG->getScope()); + processType(DIG->getType().resolve(TypeIdentifierMap)); } } for (auto *SP : CU->getSubprograms()) @@ -258,8 +258,8 @@ void DebugInfoFinder::processDeclare(const Module &M, if (!NodesSeen.insert(DV).second) return; - processScope(DV.getContext()); - processType(DV.getType().resolve(TypeIdentifierMap)); + processScope(DV->getScope()); + processType(DV->getType().resolve(TypeIdentifierMap)); } void DebugInfoFinder::processValue(const Module &M, const DbgValueInst *DVI) { @@ -274,8 +274,8 @@ void DebugInfoFinder::processValue(const Module &M, const DbgValueInst *DVI) { if (!NodesSeen.insert(DV).second) return; - processScope(DV.getContext()); - processType(DV.getType().resolve(TypeIdentifierMap)); + processScope(DV->getScope()); + processType(DV->getType().resolve(TypeIdentifierMap)); } bool DebugInfoFinder::addType(DIType DT) { -- cgit v1.2.3