mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-01 16:31:13 +00:00
Add a method to check that the subprogram holds debug info for the given Function or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69113 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d9305c7fd
commit
af5b6bb6a5
@ -309,6 +309,10 @@ namespace llvm {
|
|||||||
|
|
||||||
/// dump - print subprogram.
|
/// dump - print subprogram.
|
||||||
void dump() const;
|
void dump() const;
|
||||||
|
|
||||||
|
/// describes - Return true if this subprogram provides debugging
|
||||||
|
/// information for the function F.
|
||||||
|
bool describes(const Function *F);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DIGlobalVariable - This is a wrapper for a global variable.
|
/// DIGlobalVariable - This is a wrapper for a global variable.
|
||||||
|
@ -291,6 +291,19 @@ uint64_t DIDerivedType::getOriginalTypeSize() const {
|
|||||||
return BT.getSizeInBits();
|
return BT.getSizeInBits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// describes - Return true if this subprogram provides debugging
|
||||||
|
/// information for the function F.
|
||||||
|
bool DISubprogram::describes(const Function *F) {
|
||||||
|
assert (F && "Invalid function");
|
||||||
|
std::string Name;
|
||||||
|
getLinkageName(Name);
|
||||||
|
if (Name.empty())
|
||||||
|
getName(Name);
|
||||||
|
if (!Name.empty() && (strcmp(Name.c_str(), F->getNameStart()) == false))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// DIFactory: Basic Helpers
|
// DIFactory: Basic Helpers
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user