dawn-cmake/src
Ben Clayton 89ea705766 Add ClassID::Unique template and TINT_INSTANTIATE_CLASS_ID
We're seeing some chrome bots fail unittests in ways that suspiciously
look like dynamic casts are doing Wrong Things.

The ClassID::Of() logic depends on the linker folding away duplicate
compilation unit definitions based on ODR rules. If we were to somehow
end up with different definitions, then we'd have two or more different
ClassIDs for the same T type - leading to issues similar to what we're
seeing.

I'm not entirely sure why/how this could happen - and we've so far been
entirely unable to locally reproduce - but it _might_ have something to
do with the goma cache.

In an attempt to work around this, move the static symbol definition out
of a header-local-static and into the .cc file for each of the types.

Change-Id: If914d3045b9dac6fbe8824dac71153a768cfceb9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34563
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-02 18:19:28 +00:00
..
ast Add ClassID::Unique template and TINT_INSTANTIATE_CLASS_ID 2020-12-02 18:19:28 +00:00
diagnostic Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
inspector Post migration to castable cleanup 2020-12-01 21:07:27 +00:00
reader spirv-reader: Fix bug with passing stack-allocated variable 2020-12-02 16:30:38 +00:00
transform Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
validator Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
writer Remove unused variables. 2020-12-02 15:51:38 +00:00
CMakeLists.txt ast: Add Module.Clone() 2020-12-01 18:04:17 +00:00
castable.cc Add ClassID::Unique template and TINT_INSTANTIATE_CLASS_ID 2020-12-02 18:19:28 +00:00
castable.h Add ClassID::Unique template and TINT_INSTANTIATE_CLASS_ID 2020-12-02 18:19:28 +00:00
castable_test.cc Add ClassID::Unique template and TINT_INSTANTIATE_CLASS_ID 2020-12-02 18:19:28 +00:00
context.cc Move TypeManager from tint::Context to ast::Module 2020-11-23 19:50:55 +00:00
context.h Move TypeManager from tint::Context to ast::Module 2020-11-23 19:50:55 +00:00
namer.cc Place the namer into the context object. 2020-11-13 18:13:24 +00:00
namer.h Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
namer_test.cc Place the namer into the context object. 2020-11-13 18:13:24 +00:00
scope_stack.h Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
scope_stack_test.cc Revert "[ast] Remove unused constructors and setters." 2020-12-02 15:18:59 +00:00
source.cc Fixup lint errors. 2020-11-03 16:26:09 +00:00
source.h Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
type_determiner.cc Post migration to castable cleanup 2020-12-01 21:07:27 +00:00
type_determiner.h Fixup all doxygen tags 2020-12-02 15:31:08 +00:00
type_determiner_test.cc ast: Add Module.Clone() 2020-12-01 18:04:17 +00:00