DebugInfo: Gut DILocation

This is along the same lines as r234832, but for `DILocation`.  Clean
out all accessors from `DILocation`.  Any callers should be using
`MDLocation` directly (e.g., via `operator->()`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-14 01:35:55 +00:00
parent 1624f35f2b
commit d59e30dfb7
6 changed files with 23 additions and 37 deletions

View File

@@ -179,8 +179,8 @@ void DebugInfoFinder::processLocation(const Module &M, DILocation Loc) {
if (!Loc)
return;
InitializeTypeMap(M);
processScope(Loc.getScope());
processLocation(M, Loc.getOrigLocation());
processScope(Loc->getScope());
processLocation(M, Loc->getInlinedAt());
}
void DebugInfoFinder::processType(DIType DT) {

View File

@@ -136,10 +136,9 @@ void DiagnosticInfoOptimizationBase::getLocation(StringRef *Filename,
unsigned *Line,
unsigned *Column) const {
MDLocation *L = getDebugLoc();
DILocation DIL = L;
*Filename = DIL.getFilename();
*Line = DIL.getLineNumber();
*Column = DIL.getColumnNumber();
*Filename = L->getFilename();
*Line = L->getLine();
*Column = L->getColumn();
}
const std::string DiagnosticInfoOptimizationBase::getLocationStr() const {