mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
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
This commit is contained in:
parent
6ba6e554c7
commit
b508daa9c2
@ -381,13 +381,15 @@ StringRef DIScope::getName() const {
|
|||||||
|
|
||||||
StringRef DIScope::getFilename() const {
|
StringRef DIScope::getFilename() const {
|
||||||
if (auto *N = get())
|
if (auto *N = get())
|
||||||
return ::getStringField(dyn_cast_or_null<MDNode>(N->getFile()), 0);
|
if (auto *F = N->getFile())
|
||||||
|
return F->getFilename();
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef DIScope::getDirectory() const {
|
StringRef DIScope::getDirectory() const {
|
||||||
if (auto *N = get())
|
if (auto *N = get())
|
||||||
return ::getStringField(dyn_cast_or_null<MDNode>(N->getFile()), 1);
|
if (auto *F = N->getFile())
|
||||||
|
return F->getDirectory();
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user