mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
DebugInfo: Rewrite llvm::getDISubprogram(), NFC
Simplify implementation of `llvm::getDISubprogram()`. I might go through and see how difficult it is to update the users, since this function doesn't really seem necessary anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233662 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a04d764104
commit
81a8d62b94
@ -461,17 +461,9 @@ DIVariable llvm::cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext) {
|
||||
}
|
||||
|
||||
DISubprogram llvm::getDISubprogram(const MDNode *Scope) {
|
||||
DIDescriptor D(Scope);
|
||||
if (D.isSubprogram())
|
||||
return DISubprogram(Scope);
|
||||
|
||||
if (D.isLexicalBlockFile())
|
||||
return getDISubprogram(DILexicalBlockFile(Scope).getContext());
|
||||
|
||||
if (D.isLexicalBlock())
|
||||
return getDISubprogram(DILexicalBlock(Scope).getContext());
|
||||
|
||||
return DISubprogram();
|
||||
if (auto *LocalScope = dyn_cast_or_null<MDLocalScope>(Scope))
|
||||
return LocalScope->getSubprogram();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DISubprogram llvm::getDISubprogram(const Function *F) {
|
||||
|
Loading…
Reference in New Issue
Block a user