diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 01:59:58 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 01:59:58 +0000 |
commit | 571baebacb99a415f39acdaafe321eeb855a8407 (patch) | |
tree | c63a91db187e8de3fbc80527d1c9d9dc4648388f | |
parent | de8e4273944004a9d5bf26254f46cf75d269e41e (diff) | |
download | bcm5719-llvm-571baebacb99a415f39acdaafe321eeb855a8407.tar.gz bcm5719-llvm-571baebacb99a415f39acdaafe321eeb855a8407.zip |
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
-rw-r--r-- | llvm/include/llvm/IR/DebugInfo.h | 5 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h index 462695b6c50..6eb37a07541 100644 --- a/llvm/include/llvm/IR/DebugInfo.h +++ b/llvm/include/llvm/IR/DebugInfo.h @@ -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; }; diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index a10ceefa4f6..53cd85532ae 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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 |