[spirv-writer] Don't hash `const char*`
Import into google3 is complaining that:
hash<const char*> would hash the pointer, not the contents of the
string, which is almost certainly not what you want.
A better follow-on solution may be pass an enum instead.
Change-Id: I34a4796e14e8cc64e5747e766f8b025eb3e2aefa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/154641
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/spirv/writer/common/module.h b/src/tint/lang/spirv/writer/common/module.h
index df95adc..bd209cc 100644
--- a/src/tint/lang/spirv/writer/common/module.h
+++ b/src/tint/lang/spirv/writer/common/module.h
@@ -17,6 +17,7 @@
#include <cstdint>
#include <functional>
+#include <string>
#include <vector>
#include "src/tint/lang/spirv/writer/common/function.h"
@@ -154,7 +155,7 @@
InstructionList annotations_;
std::vector<Function> functions_;
Hashset<uint32_t, 8> capability_set_;
- Hashset<const char*, 8> extension_set_;
+ Hashset<std::string, 8> extension_set_;
};
} // namespace tint::spirv::writer