mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 22:04:10 +00:00
DebugInfo: Use MDFile instead of accessing operands directly, NFC
llvm-svn: 234175
This commit is contained in:
parent
6fa49967ca
commit
3d8d823eda
@ -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 "";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user