[llvm] r234837 - DebugInfo: Inline DIVariable::isBlockByrefVariable() into its callers
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Apr 13 18:59:58 PDT 2015
Author: dexonsmith
Date: Mon Apr 13 20:59:58 2015
New Revision: 234837
URL: http://llvm.org/viewvc/llvm-project?rev=234837&view=rev
Log:
DebugInfo: Inline DIVariable::isBlockByrefVariable() into its callers
I don't think this API is helping much. Change the callers to call
`MDType::isBlockByrefStruct()` directly.
Modified:
llvm/trunk/include/llvm/IR/DebugInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=234837&r1=234836&r2=234837&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Mon Apr 13 20:59:58 2015
@@ -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;
};
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=234837&r1=234836&r2=234837&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Apr 13 20:59:58 2015
@@ -135,14 +135,16 @@ template <typename T> T DbgVariable::res
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
More information about the llvm-commits
mailing list