summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-06 16:43:40 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-06 16:43:40 +0000
commit897030c80c3eb90c64a9cdd7036dfe24bcdbcc2d (patch)
treed1112e965e3dd446a9ebc36331fc31f31b64cd68 /llvm
parent41e2b5c55fafe4ed6030be2a3f362e119df0c085 (diff)
downloadbcm5719-llvm-897030c80c3eb90c64a9cdd7036dfe24bcdbcc2d.tar.gz
bcm5719-llvm-897030c80c3eb90c64a9cdd7036dfe24bcdbcc2d.zip
DebugInfo: Use MDFile instead of accessing operands directly, NFC
llvm-svn: 234175
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 59d1511cc26..70025c77518 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/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<MDNode>(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<MDNode>(N->getFile()), 1);
+ if (auto *F = N->getFile())
+ return F->getDirectory();
return "";
}
OpenPOWER on IntegriCloud