summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 01:35:55 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 01:35:55 +0000
commitb7e221ba5530d2da215a47d7adcecc87e9506d8d (patch)
tree398705e25f6f6b6676842637bd3af37820bc137c /llvm/lib/Transforms/Utils
parent18783cea3fd62ef2cef4020c4c41307201652215 (diff)
downloadbcm5719-llvm-b7e221ba5530d2da215a47d7adcecc87e9506d8d.tar.gz
bcm5719-llvm-b7e221ba5530d2da215a47d7adcecc87e9506d8d.zip
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->()`). llvm-svn: 234835
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/AddDiscriminators.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp
index 2cbe93e30aa..526dc34d65b 100644
--- a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp
+++ b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp
@@ -192,8 +192,8 @@ bool AddDiscriminators::runOnFunction(Function &F) {
if (!FirstDIL->canDiscriminate(*LastDIL)) {
// Create a new lexical scope and compute a new discriminator
// number for it.
- StringRef Filename = FirstDIL.getFilename();
- DIScope Scope = FirstDIL.getScope();
+ StringRef Filename = FirstDIL->getFilename();
+ DIScope Scope = FirstDIL->getScope();
DIFile File = Builder.createFile(Filename, Scope.getDirectory());
// FIXME: Calculate the discriminator here, based on local information,
@@ -204,10 +204,10 @@ bool AddDiscriminators::runOnFunction(Function &F) {
unsigned Discriminator = FirstDIL->computeNewDiscriminator();
DILexicalBlockFile NewScope =
Builder.createLexicalBlockFile(Scope, File, Discriminator);
- DILocation NewDIL =
+ auto *NewDIL =
MDLocation::get(Ctx, FirstDIL->getLine(), FirstDIL->getColumn(),
NewScope, FirstDIL->getInlinedAt());
- DebugLoc newDebugLoc = NewDIL.get();
+ DebugLoc newDebugLoc = NewDIL;
// Attach this new debug location to First and every
// instruction following First that shares the same location.
@@ -216,9 +216,9 @@ bool AddDiscriminators::runOnFunction(Function &F) {
if (I1->getDebugLoc().get() != FirstDIL)
break;
I1->setDebugLoc(newDebugLoc);
- DEBUG(dbgs() << NewDIL.getFilename() << ":" << NewDIL.getLineNumber()
- << ":" << NewDIL.getColumnNumber() << ":"
- << NewDIL.getDiscriminator() << *I1 << "\n");
+ DEBUG(dbgs() << NewDIL->getFilename() << ":" << NewDIL->getLine()
+ << ":" << NewDIL->getColumn() << ":"
+ << NewDIL->getDiscriminator() << *I1 << "\n");
}
DEBUG(dbgs() << "\n");
Changed = true;
OpenPOWER on IntegriCloud