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:
Duncan P. N. Exon Smith
2015-04-14 01:59:58 +00:00
parent b0b5cb29ab
commit 3e31f5eeb1
2 changed files with 4 additions and 7 deletions

View File

@@ -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