mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 19:32:16 +00:00
DebugInfo: Drop confusing forwarding API from DILexicalBlockFile
Remove `DILexicalBlockFile::getScope()` (whose last use was removed from clang in r234245), which illegally returned a `DILexicalBlock` despite its scope sometimes being an `MDSubprogram`. Also remove the `getLineNumber()` and `getColumnNumber()` methods that just forwarded to `DILexicalBlock`'s versions, since there don't seem to be any callers. Note that the block of code removed from `DebugInfo.cpp` was actually dead code, since `isLexicalBlock()` (the previous branch) always returns true when `isLexicalBlockFile()` returns true. An earlier (broken and untested) version of this was squashed into r234222 and reverted in r234225. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0123b6ee73
commit
cf0d94f462
@ -745,10 +745,7 @@ public:
|
|||||||
return *get();
|
return *get();
|
||||||
}
|
}
|
||||||
|
|
||||||
DIScope getContext() const { return getScope(); }
|
DIScope getContext() const { return get()->getScope(); }
|
||||||
unsigned getLineNumber() const { return getScope().getLineNumber(); }
|
|
||||||
unsigned getColumnNumber() const { return getScope().getColumnNumber(); }
|
|
||||||
DILexicalBlock getScope() const { return DILexicalBlock(get()->getScope()); }
|
|
||||||
unsigned getDiscriminator() const { return get()->getDiscriminator(); }
|
unsigned getDiscriminator() const { return get()->getDiscriminator(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1050,11 +1047,9 @@ public:
|
|||||||
// Since discriminators are associated with lexical blocks, make
|
// Since discriminators are associated with lexical blocks, make
|
||||||
// sure this location is a lexical block before retrieving its
|
// sure this location is a lexical block before retrieving its
|
||||||
// value.
|
// value.
|
||||||
return getScope().isLexicalBlockFile()
|
if (auto *F = dyn_cast<MDLexicalBlockFile>(get()->getScope()))
|
||||||
? DILexicalBlockFile(
|
return F->getDiscriminator();
|
||||||
cast<MDNode>(cast<MDLocation>(DbgNode)->getScope()))
|
return 0;
|
||||||
.getDiscriminator()
|
|
||||||
: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Generate a new discriminator value for this location.
|
/// \brief Generate a new discriminator value for this location.
|
||||||
|
@ -498,9 +498,6 @@ void DebugInfoFinder::processScope(DIScope Scope) {
|
|||||||
if (Scope.isLexicalBlock()) {
|
if (Scope.isLexicalBlock()) {
|
||||||
DILexicalBlock LB(Scope);
|
DILexicalBlock LB(Scope);
|
||||||
processScope(LB.getContext());
|
processScope(LB.getContext());
|
||||||
} else if (Scope.isLexicalBlockFile()) {
|
|
||||||
DILexicalBlockFile LBF = DILexicalBlockFile(Scope);
|
|
||||||
processScope(LBF.getScope());
|
|
||||||
} else if (Scope.isNameSpace()) {
|
} else if (Scope.isNameSpace()) {
|
||||||
DINameSpace NS(Scope);
|
DINameSpace NS(Scope);
|
||||||
processScope(NS.getContext());
|
processScope(NS.getContext());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user