From: Duncan P. N. Exon Smith Date: Mon, 6 Apr 2015 16:43:40 +0000 (+0000) Subject: DebugInfo: Use MDFile instead of accessing operands directly, NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b508daa9c2f69d38fd939765530ec0b03373175f;p=oota-llvm.git DebugInfo: Use MDFile instead of accessing operands directly, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234175 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 59d1511cc26..70025c77518 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -381,13 +381,15 @@ StringRef DIScope::getName() const { StringRef DIScope::getFilename() const { if (auto *N = get()) - return ::getStringField(dyn_cast_or_null(N->getFile()), 0); + if (auto *F = N->getFile()) + return F->getFilename(); return ""; } StringRef DIScope::getDirectory() const { if (auto *N = get()) - return ::getStringField(dyn_cast_or_null(N->getFile()), 1); + if (auto *F = N->getFile()) + return F->getDirectory(); return ""; }