From 82eba746df36e6bc95b0c0667697cdeb3dc4fbef Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 30 Mar 2015 23:47:26 +0000 Subject: 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 --- llvm/lib/IR/DebugLoc.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'llvm/lib/IR/DebugLoc.cpp') 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) -- cgit v1.2.3