[Mesa-dev] [PATCH 09/11] clover: Add constructors to some of the module classes
Tom Stellard
tstellar at gmail.com
Fri May 11 09:39:24 PDT 2012
This is for the llvm code that can't use extended initializers.
---
src/gallium/state_trackers/clover/core/module.hpp | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/gallium/state_trackers/clover/core/module.hpp b/src/gallium/state_trackers/clover/core/module.hpp
index bc4b203..f7f7bb0 100644
--- a/src/gallium/state_trackers/clover/core/module.hpp
+++ b/src/gallium/state_trackers/clover/core/module.hpp
@@ -48,6 +48,11 @@ namespace clover {
type type;
size_t size;
clover::compat::vector<char> data;
+
+ section(resource_id id, enum type type, size_t size,
+ clover::compat::vector<char> data) :
+ id(id), type(type), size(size), data(data) { }
+ section() { }
};
struct argument {
@@ -65,6 +70,9 @@ namespace clover {
type type;
size_t size;
+
+ argument(enum type type, size_t size) : type(type), size(size) { }
+ argument() { }
};
struct symbol {
@@ -72,6 +80,11 @@ namespace clover {
resource_id section;
size_t offset;
clover::compat::vector<argument> args;
+
+ symbol(clover::compat::vector<char> name, resource_id section,
+ size_t offset, clover::compat::vector<argument> args) :
+ name(name), section(section), offset(offset), args(args) { }
+ symbol() { }
};
void serialize(compat::ostream &os) const;
--
1.7.7.6
More information about the mesa-dev
mailing list