mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-05 02:49:18 +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. llvm-svn: 234837
This commit is contained in:
parent
c1a1d9a119
commit
1756352377
@ -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