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`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-14 02:22:36 +00:00
parent 4edb309c27
commit 355ec009e5
14 changed files with 74 additions and 111 deletions

View File

@@ -91,10 +91,10 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
}
for (DIGlobalVariable GV : Finder.global_variables()) {
O << "Global variable: " << GV.getName();
printFile(O, GV.getFilename(), GV.getDirectory(), GV.getLineNumber());
if (!GV.getLinkageName().empty())
O << " ('" << GV.getLinkageName() << "')";
O << "Global variable: " << GV->getName();
printFile(O, GV->getFilename(), GV->getDirectory(), GV->getLine());
if (!GV->getLinkageName().empty())
O << " ('" << GV->getLinkageName() << "')";
O << '\n';
}