mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Debug Info Finder: use processDeclare and processValue to list debug info
MDNodes used by DbgDeclareInst and DbgValueInst. Another 16 testing cases failed and they are disabled with -disable-debug-info-verifier. A total of 34 cases are disabled with -disable-debug-info-verifier and will be corrected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186902 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -847,6 +847,15 @@ bool llvm::isSubprogramContext(const MDNode *Context) {
|
||||
// DebugInfoFinder implementations.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
void DebugInfoFinder::reset() {
|
||||
CUs.clear();
|
||||
SPs.clear();
|
||||
GVs.clear();
|
||||
TYs.clear();
|
||||
Scopes.clear();
|
||||
NodesSeen.clear();
|
||||
}
|
||||
|
||||
/// processModule - Process entire module and collect debug info.
|
||||
void DebugInfoFinder::processModule(const Module &M) {
|
||||
if (NamedMDNode *CU_Nodes = M.getNamedMetadata("llvm.dbg.cu")) {
|
||||
@ -970,6 +979,19 @@ void DebugInfoFinder::processDeclare(const DbgDeclareInst *DDI) {
|
||||
processType(DIVariable(N).getType());
|
||||
}
|
||||
|
||||
void DebugInfoFinder::processValue(const DbgValueInst *DVI) {
|
||||
MDNode *N = dyn_cast<MDNode>(DVI->getVariable());
|
||||
if (!N) return;
|
||||
|
||||
DIDescriptor DV(N);
|
||||
if (!DV.isVariable())
|
||||
return;
|
||||
|
||||
if (!NodesSeen.insert(DV))
|
||||
return;
|
||||
processType(DIVariable(N).getType());
|
||||
}
|
||||
|
||||
/// addType - Add type into Tys.
|
||||
bool DebugInfoFinder::addType(DIType DT) {
|
||||
if (!DT.isValid())
|
||||
|
Reference in New Issue
Block a user