aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/HLSLBufferLayoutBuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/HLSLBufferLayoutBuilder.h')
-rw-r--r--clang/lib/CodeGen/HLSLBufferLayoutBuilder.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/HLSLBufferLayoutBuilder.h b/clang/lib/CodeGen/HLSLBufferLayoutBuilder.h
index 61240b2..916e60e 100644
--- a/clang/lib/CodeGen/HLSLBufferLayoutBuilder.h
+++ b/clang/lib/CodeGen/HLSLBufferLayoutBuilder.h
@@ -14,6 +14,7 @@ class RecordType;
class FieldDecl;
namespace CodeGen {
+class CGHLSLOffsetInfo;
class CodeGenModule;
//===----------------------------------------------------------------------===//
@@ -33,14 +34,15 @@ public:
// Returns LLVM target extension type with the name LayoutTypeName
// for given structure type and layout data. The first number in
// the Layout is the size followed by offsets for each struct element.
- llvm::TargetExtType *
- createLayoutType(const RecordType *StructType,
- const llvm::SmallVector<int32_t> *Packoffsets = nullptr);
+ llvm::TargetExtType *createLayoutType(const RecordType *StructType,
+ const CGHLSLOffsetInfo &OffsetInfo);
private:
bool layoutField(const clang::FieldDecl *FD, unsigned &EndOffset,
unsigned &FieldOffset, llvm::Type *&FieldType,
- int Packoffset = -1);
+ uint32_t Packoffset);
+ bool layoutField(const clang::FieldDecl *FD, unsigned &EndOffset,
+ unsigned &FieldOffset, llvm::Type *&FieldType);
};
} // namespace CodeGen