mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
DebugInfo: Add forwarding getFilename() accessor to new hierarchy
Add forwarding `getFilename()` and `getDirectory()` accessors to nodes in the new hierarchy that define a `getFile()`. Use that to re-implement existing functionality in the `DIDescriptor` hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -143,20 +143,6 @@ StringRef DIScope::getName() const {
|
||||
return StringRef();
|
||||
}
|
||||
|
||||
StringRef DIScope::getFilename() const {
|
||||
if (auto *N = get())
|
||||
if (auto *F = N->getFile())
|
||||
return F->getFilename();
|
||||
return "";
|
||||
}
|
||||
|
||||
StringRef DIScope::getDirectory() const {
|
||||
if (auto *N = get())
|
||||
if (auto *F = N->getFile())
|
||||
return F->getDirectory();
|
||||
return "";
|
||||
}
|
||||
|
||||
void DICompileUnit::replaceSubprograms(DIArray Subprograms) {
|
||||
get()->replaceSubprograms(MDSubprogramArray(Subprograms));
|
||||
}
|
||||
|
Reference in New Issue
Block a user