mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
DebugInfo: Make MDSubprogram::getFunction() return Constant
Change `MDSubprogram::getFunction()` and `MDGlobalVariable::getConstant()` to return a `Constant`. Previously, both returned `ConstantAsMetadata`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -49,12 +49,6 @@ bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
|
||||
return !SP.describes(CurFn);
|
||||
}
|
||||
|
||||
Function *DISubprogram::getFunction() const {
|
||||
if (auto *C = dyn_cast_or_null<ConstantAsMetadata>(get()->getFunction()))
|
||||
return dyn_cast<Function>(C->getValue());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool DISubprogram::describes(const Function *F) {
|
||||
assert(F && "Invalid function");
|
||||
if (F == getFunction())
|
||||
|
Reference in New Issue
Block a user