Type-checking for ForEach with RS types.
BUG=4203264
Change-Id: I90e54cdf22fea76ffde9548617fb7b492ba9d643
diff --git a/slang_rs_reflection.h b/slang_rs_reflection.h
index 2da7484..29e9f18 100644
--- a/slang_rs_reflection.h
+++ b/slang_rs_reflection.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2010, The Android Open Source Project
+ * Copyright 2010-2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
#include <fstream>
#include <iostream>
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -102,6 +103,8 @@
bool mUseStdout;
mutable std::ofstream mOF;
+ std::set<std::string> mTypesToCheck;
+
static const char *AccessModifierStr(AccessModifier AM);
Context(const std::string &OutputPathBase,
@@ -241,9 +244,12 @@
void genExportForEach(Context &C,
const RSExportForEach *EF);
- void genTypeCheck(Context &C,
- const RSExportType *ET,
- const char *VarName);
+ static void genTypeCheck(Context &C,
+ const RSExportType *ET,
+ const char *VarName);
+
+ static void genTypeInstance(Context &C,
+ const RSExportType *ET);
bool genTypeClass(Context &C,
const RSExportRecordType *ERT,