[DebugInfo][OpenCL] Address post-commit review for r338299
NFC refactor of code to generate debug info for OpenCL 2.X blocks.
Differential Revision: https://reviews.llvm.org/D50099
llvm-svn: 339265
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index e632806..95cba9d 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -311,6 +311,22 @@
void AppendAddressSpaceXDeref(unsigned AddressSpace,
SmallVectorImpl<int64_t> &Expr) const;
+ /// A helper function to collect debug info for the default elements of a
+ /// block.
+ ///
+ /// \returns The next available field offset after the default elements.
+ uint64_t collectDefaultElementTypesForBlockPointer(
+ const BlockPointerType *Ty, llvm::DIFile *Unit,
+ llvm::DIDerivedType *DescTy, unsigned LineNo,
+ SmallVectorImpl<llvm::Metadata *> &EltTys);
+
+ /// A helper function to collect debug info for the default fields of a
+ /// block.
+ void collectDefaultFieldsForBlockLiteralDeclare(
+ const CGBlockInfo &Block, const ASTContext &Context, SourceLocation Loc,
+ const llvm::StructLayout &BlockLayout, llvm::DIFile *Unit,
+ SmallVectorImpl<llvm::Metadata *> &Fields);
+
public:
CGDebugInfo(CodeGenModule &CGM);
~CGDebugInfo();