mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
DebugInfo: Inline DIVariable::isBlockByrefVariable() into its callers
I don't think this API is helping much. Change the callers to call `MDType::isBlockByrefStruct()` directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b0b5cb29ab
commit
3e31f5eeb1
@ -643,11 +643,6 @@ public:
|
||||
/// \brief If this variable is inlined then return inline location.
|
||||
MDNode *getInlinedAt() const { return get()->getInlinedAt(); }
|
||||
|
||||
/// \brief Check if this is a "__block" variable (Apple Blocks).
|
||||
bool isBlockByrefVariable(const DITypeIdentifierMap &Map) const {
|
||||
return (getType().resolve(Map)).isBlockByrefStruct();
|
||||
}
|
||||
|
||||
void printExtendedName(raw_ostream &OS) const;
|
||||
};
|
||||
|
||||
|
@ -135,14 +135,16 @@ template <typename T> T DbgVariable::resolve(DIRef<T> Ref) const {
|
||||
|
||||
bool DbgVariable::isBlockByrefVariable() const {
|
||||
assert(Var && "Invalid complex DbgVariable!");
|
||||
return Var.isBlockByrefVariable(DD->getTypeIdentifierMap());
|
||||
return Var->getType()
|
||||
.resolve(DD->getTypeIdentifierMap())
|
||||
->isBlockByrefStruct();
|
||||
}
|
||||
|
||||
DIType DbgVariable::getType() const {
|
||||
DIType Ty = Var.getType().resolve(DD->getTypeIdentifierMap());
|
||||
// FIXME: isBlockByrefVariable should be reformulated in terms of complex
|
||||
// addresses instead.
|
||||
if (Var.isBlockByrefVariable(DD->getTypeIdentifierMap())) {
|
||||
if (Ty->isBlockByrefStruct()) {
|
||||
/* Byref variables, in Blocks, are declared by the programmer as
|
||||
"SomeType VarName;", but the compiler creates a
|
||||
__Block_byref_x_VarName struct, and gives the variable VarName
|
||||
|
Loading…
x
Reference in New Issue
Block a user