AST: Have type deepCopy() preserve type graphs as graphs.
Previously, a type graph would turn into a type tree. That is, a deep node that is shared would have multiple copies made. This is important when creating IO and non-IO versions of deep types.
This commit is contained in:
24
Test/hlsl.typeGraphCopy.vert
Normal file
24
Test/hlsl.typeGraphCopy.vert
Normal file
@@ -0,0 +1,24 @@
|
||||
struct N1 {
|
||||
int a;
|
||||
float b;
|
||||
};
|
||||
|
||||
struct N2 {
|
||||
N1 s1;
|
||||
N1 s2;
|
||||
};
|
||||
|
||||
struct N3 {
|
||||
N2 t1;
|
||||
N1 t2;
|
||||
N2 t3;
|
||||
};
|
||||
|
||||
typedef N3 T3;
|
||||
|
||||
T3 foo;
|
||||
|
||||
float main()
|
||||
{
|
||||
return foo.t3.s2.b;
|
||||
}
|
||||
Reference in New Issue
Block a user