summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugLoc.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 23:47:26 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 23:47:26 +0000
commit82eba746df36e6bc95b0c0667697cdeb3dc4fbef (patch)
treeb17dff6f830a2ab7052af60ed10d72b204efcf66 /llvm/lib/IR/DebugLoc.cpp
parenta8c2a0b0b24d915a2e8fcfaf9cdc01aafc7c0b9c (diff)
downloadbcm5719-llvm-82eba746df36e6bc95b0c0667697cdeb3dc4fbef.tar.gz
bcm5719-llvm-82eba746df36e6bc95b0c0667697cdeb3dc4fbef.zip
DebugLoc: Remove getFromDILexicalBlock()
The only user of `DebugLoc::getFromDILexicalBlock()` was creating a new `MDLocation` as convenient API for passing an `MDScope`. Stop doing that, and remove the API. If in the future we actually *want* to create new DebugLocs, calling `MDLexicalBlock::get()` makes more sense. llvm-svn: 233643
Diffstat (limited to 'llvm/lib/IR/DebugLoc.cpp')
-rw-r--r--llvm/lib/IR/DebugLoc.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp
index 5a5f201fe12..95f6d67c542 100644
--- a/llvm/lib/IR/DebugLoc.cpp
+++ b/llvm/lib/IR/DebugLoc.cpp
@@ -66,15 +66,6 @@ DebugLoc DebugLoc::get(unsigned Line, unsigned Col,
return MDLocation::get(Scope->getContext(), Line, Col, Scope, InlinedAt);
}
-/// getFromDILexicalBlock - Translate the DILexicalBlock into a DebugLoc.
-DebugLoc DebugLoc::getFromDILexicalBlock(MDNode *N) {
- DILexicalBlock LexBlock(N);
- MDNode *Scope = LexBlock.getContext();
- if (!Scope) return DebugLoc();
- return get(LexBlock.getLineNumber(), LexBlock.getColumnNumber(), Scope,
- nullptr);
-}
-
void DebugLoc::dump() const {
#ifndef NDEBUG
if (!Loc)
OpenPOWER on IntegriCloud