ir: Simplify types in generics.

This was an oversight in 1903686f9e
because the code I grabbed to visit the generics was dealing with them
somewhere else.
This commit is contained in:
Emilio Cobos Álvarez
2021-03-02 19:32:37 +01:00
parent a0dc1a1fcb
commit aaef260faf
35 changed files with 85 additions and 78 deletions
+2 -2
View File
@@ -17,9 +17,9 @@ using Box = T*;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_Box_i32 NotReprC_Box_i32;
typedef struct NotReprC_____i32 NotReprC_____i32;
typedef struct NotReprC_Box_i32 Foo;
typedef struct NotReprC_____i32 Foo;
typedef struct MyStruct {
int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using Box = T*;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_Box_i32 NotReprC_Box_i32;
typedef struct NotReprC_____i32 NotReprC_____i32;
typedef struct NotReprC_Box_i32 Foo;
typedef struct NotReprC_____i32 Foo;
typedef struct MyStruct {
int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using Box = T*;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_Box_i32 NotReprC_Box_i32;
typedef struct NotReprC_____i32 NotReprC_____i32;
typedef NotReprC_Box_i32 Foo;
typedef NotReprC_____i32 Foo;
typedef struct {
int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using Box = T*;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_Box_i32 NotReprC_Box_i32;
typedef struct NotReprC_____i32 NotReprC_____i32;
typedef NotReprC_Box_i32 Foo;
typedef NotReprC_____i32 Foo;
typedef struct {
int32_t *number;
+2 -2
View File
@@ -20,10 +20,10 @@ cdef extern from *:
cdef extern from *:
ctypedef struct NotReprC_Box_i32:
ctypedef struct NotReprC_____i32:
pass
ctypedef NotReprC_Box_i32 Foo;
ctypedef NotReprC_____i32 Foo;
ctypedef struct MyStruct:
int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using Box = T*;
#include <stdint.h>
#include <stdlib.h>
struct NotReprC_Box_i32;
struct NotReprC_____i32;
typedef struct NotReprC_Box_i32 Foo;
typedef struct NotReprC_____i32 Foo;
struct MyStruct {
int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using Box = T*;
#include <stdint.h>
#include <stdlib.h>
struct NotReprC_Box_i32;
struct NotReprC_____i32;
typedef struct NotReprC_Box_i32 Foo;
typedef struct NotReprC_____i32 Foo;
struct MyStruct {
int32_t *number;
+2 -2
View File
@@ -20,10 +20,10 @@ cdef extern from *:
cdef extern from *:
cdef struct NotReprC_Box_i32:
cdef struct NotReprC_____i32:
pass
ctypedef NotReprC_Box_i32 Foo;
ctypedef NotReprC_____i32 Foo;
cdef struct MyStruct:
int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using ManuallyDrop = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_ManuallyDrop_Point NotReprC_ManuallyDrop_Point;
typedef struct NotReprC_Point NotReprC_Point;
typedef struct NotReprC_ManuallyDrop_Point Foo;
typedef struct NotReprC_Point Foo;
typedef struct Point {
int32_t x;
@@ -17,9 +17,9 @@ using ManuallyDrop = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_ManuallyDrop_Point NotReprC_ManuallyDrop_Point;
typedef struct NotReprC_Point NotReprC_Point;
typedef struct NotReprC_ManuallyDrop_Point Foo;
typedef struct NotReprC_Point Foo;
typedef struct Point {
int32_t x;
+2 -2
View File
@@ -17,9 +17,9 @@ using ManuallyDrop = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_ManuallyDrop_Point NotReprC_ManuallyDrop_Point;
typedef struct NotReprC_Point NotReprC_Point;
typedef NotReprC_ManuallyDrop_Point Foo;
typedef NotReprC_Point Foo;
typedef struct {
int32_t x;
+2 -2
View File
@@ -17,9 +17,9 @@ using ManuallyDrop = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_ManuallyDrop_Point NotReprC_ManuallyDrop_Point;
typedef struct NotReprC_Point NotReprC_Point;
typedef NotReprC_ManuallyDrop_Point Foo;
typedef NotReprC_Point Foo;
typedef struct {
int32_t x;
+2 -2
View File
@@ -20,10 +20,10 @@ cdef extern from *:
cdef extern from *:
ctypedef struct NotReprC_ManuallyDrop_Point:
ctypedef struct NotReprC_Point:
pass
ctypedef NotReprC_ManuallyDrop_Point Foo;
ctypedef NotReprC_Point Foo;
ctypedef struct Point:
int32_t x;
+2 -2
View File
@@ -17,9 +17,9 @@ using ManuallyDrop = T;
#include <stdint.h>
#include <stdlib.h>
struct NotReprC_ManuallyDrop_Point;
struct NotReprC_Point;
typedef struct NotReprC_ManuallyDrop_Point Foo;
typedef struct NotReprC_Point Foo;
struct Point {
int32_t x;
+2 -2
View File
@@ -17,9 +17,9 @@ using ManuallyDrop = T;
#include <stdint.h>
#include <stdlib.h>
struct NotReprC_ManuallyDrop_Point;
struct NotReprC_Point;
typedef struct NotReprC_ManuallyDrop_Point Foo;
typedef struct NotReprC_Point Foo;
struct Point {
int32_t x;
+2 -2
View File
@@ -20,10 +20,10 @@ cdef extern from *:
cdef extern from *:
cdef struct NotReprC_ManuallyDrop_Point:
cdef struct NotReprC_Point:
pass
ctypedef NotReprC_ManuallyDrop_Point Foo;
ctypedef NotReprC_Point Foo;
cdef struct Point:
int32_t x;
+2 -2
View File
@@ -17,9 +17,9 @@ using MaybeUninit = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_MaybeUninit______i32 NotReprC_MaybeUninit______i32;
typedef struct NotReprC______i32 NotReprC______i32;
typedef struct NotReprC_MaybeUninit______i32 Foo;
typedef struct NotReprC______i32 Foo;
typedef struct MyStruct {
const int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using MaybeUninit = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_MaybeUninit______i32 NotReprC_MaybeUninit______i32;
typedef struct NotReprC______i32 NotReprC______i32;
typedef struct NotReprC_MaybeUninit______i32 Foo;
typedef struct NotReprC______i32 Foo;
typedef struct MyStruct {
const int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using MaybeUninit = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_MaybeUninit______i32 NotReprC_MaybeUninit______i32;
typedef struct NotReprC______i32 NotReprC______i32;
typedef NotReprC_MaybeUninit______i32 Foo;
typedef NotReprC______i32 Foo;
typedef struct {
const int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using MaybeUninit = T;
#include <stdint.h>
#include <stdlib.h>
typedef struct NotReprC_MaybeUninit______i32 NotReprC_MaybeUninit______i32;
typedef struct NotReprC______i32 NotReprC______i32;
typedef NotReprC_MaybeUninit______i32 Foo;
typedef NotReprC______i32 Foo;
typedef struct {
const int32_t *number;
+2 -2
View File
@@ -20,10 +20,10 @@ cdef extern from *:
cdef extern from *:
ctypedef struct NotReprC_MaybeUninit______i32:
ctypedef struct NotReprC______i32:
pass
ctypedef NotReprC_MaybeUninit______i32 Foo;
ctypedef NotReprC______i32 Foo;
ctypedef struct MyStruct:
const int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using MaybeUninit = T;
#include <stdint.h>
#include <stdlib.h>
struct NotReprC_MaybeUninit______i32;
struct NotReprC______i32;
typedef struct NotReprC_MaybeUninit______i32 Foo;
typedef struct NotReprC______i32 Foo;
struct MyStruct {
const int32_t *number;
+2 -2
View File
@@ -17,9 +17,9 @@ using MaybeUninit = T;
#include <stdint.h>
#include <stdlib.h>
struct NotReprC_MaybeUninit______i32;
struct NotReprC______i32;
typedef struct NotReprC_MaybeUninit______i32 Foo;
typedef struct NotReprC______i32 Foo;
struct MyStruct {
const int32_t *number;
+2 -2
View File
@@ -20,10 +20,10 @@ cdef extern from *:
cdef extern from *:
cdef struct NotReprC_MaybeUninit______i32:
cdef struct NotReprC______i32:
pass
ctypedef NotReprC_MaybeUninit______i32 Foo;
ctypedef NotReprC______i32 Foo;
cdef struct MyStruct:
const int32_t *number;
+3 -3
View File
@@ -16,7 +16,7 @@ struct NonZeroI64;
#include <stdint.h>
#include <stdlib.h>
typedef struct Option_Option_NonZeroI64 Option_Option_NonZeroI64;
typedef struct Option_i64 Option_i64;
typedef struct NonZeroTest {
uint8_t a;
@@ -28,7 +28,7 @@ typedef struct NonZeroTest {
int32_t g;
int64_t h;
int64_t i;
const struct Option_Option_NonZeroI64 *j;
const struct Option_i64 *j;
} NonZeroTest;
void root(struct NonZeroTest test,
@@ -41,4 +41,4 @@ void root(struct NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const struct Option_Option_NonZeroI64 *j);
const struct Option_i64 *j);
+3 -3
View File
@@ -16,7 +16,7 @@ struct NonZeroI64;
#include <stdint.h>
#include <stdlib.h>
typedef struct Option_Option_NonZeroI64 Option_Option_NonZeroI64;
typedef struct Option_i64 Option_i64;
typedef struct NonZeroTest {
uint8_t a;
@@ -28,7 +28,7 @@ typedef struct NonZeroTest {
int32_t g;
int64_t h;
int64_t i;
const struct Option_Option_NonZeroI64 *j;
const struct Option_i64 *j;
} NonZeroTest;
#ifdef __cplusplus
@@ -45,7 +45,7 @@ void root(struct NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const struct Option_Option_NonZeroI64 *j);
const struct Option_i64 *j);
#ifdef __cplusplus
} // extern "C"
+3 -3
View File
@@ -16,7 +16,7 @@ struct NonZeroI64;
#include <stdint.h>
#include <stdlib.h>
typedef struct Option_Option_NonZeroI64 Option_Option_NonZeroI64;
typedef struct Option_i64 Option_i64;
typedef struct {
uint8_t a;
@@ -28,7 +28,7 @@ typedef struct {
int32_t g;
int64_t h;
int64_t i;
const Option_Option_NonZeroI64 *j;
const Option_i64 *j;
} NonZeroTest;
void root(NonZeroTest test,
@@ -41,4 +41,4 @@ void root(NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const Option_Option_NonZeroI64 *j);
const Option_i64 *j);
+3 -3
View File
@@ -16,7 +16,7 @@ struct NonZeroI64;
#include <stdint.h>
#include <stdlib.h>
typedef struct Option_Option_NonZeroI64 Option_Option_NonZeroI64;
typedef struct Option_i64 Option_i64;
typedef struct {
uint8_t a;
@@ -28,7 +28,7 @@ typedef struct {
int32_t g;
int64_t h;
int64_t i;
const Option_Option_NonZeroI64 *j;
const Option_i64 *j;
} NonZeroTest;
#ifdef __cplusplus
@@ -45,7 +45,7 @@ void root(NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const Option_Option_NonZeroI64 *j);
const Option_i64 *j);
#ifdef __cplusplus
} // extern "C"
+2 -2
View File
@@ -30,7 +30,7 @@ struct NonZeroTest {
int32_t g;
int64_t h;
int64_t i;
const Option<Option<NonZeroI64>> *j;
const Option<int64_t> *j;
};
extern "C" {
@@ -45,6 +45,6 @@ void root(NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const Option<Option<NonZeroI64>> *j);
const Option<int64_t> *j);
} // extern "C"
+3 -3
View File
@@ -19,7 +19,7 @@ cdef extern from *:
cdef extern from *:
ctypedef struct Option_Option_NonZeroI64:
ctypedef struct Option_i64:
pass
ctypedef struct NonZeroTest:
@@ -32,7 +32,7 @@ cdef extern from *:
int32_t g;
int64_t h;
int64_t i;
const Option_Option_NonZeroI64 *j;
const Option_i64 *j;
void root(NonZeroTest test,
uint8_t a,
@@ -44,4 +44,4 @@ cdef extern from *:
int32_t g,
int64_t h,
int64_t i,
const Option_Option_NonZeroI64 *j);
const Option_i64 *j);
+3 -3
View File
@@ -16,7 +16,7 @@ struct NonZeroI64;
#include <stdint.h>
#include <stdlib.h>
struct Option_Option_NonZeroI64;
struct Option_i64;
struct NonZeroTest {
uint8_t a;
@@ -28,7 +28,7 @@ struct NonZeroTest {
int32_t g;
int64_t h;
int64_t i;
const struct Option_Option_NonZeroI64 *j;
const struct Option_i64 *j;
};
void root(struct NonZeroTest test,
@@ -41,4 +41,4 @@ void root(struct NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const struct Option_Option_NonZeroI64 *j);
const struct Option_i64 *j);
+3 -3
View File
@@ -16,7 +16,7 @@ struct NonZeroI64;
#include <stdint.h>
#include <stdlib.h>
struct Option_Option_NonZeroI64;
struct Option_i64;
struct NonZeroTest {
uint8_t a;
@@ -28,7 +28,7 @@ struct NonZeroTest {
int32_t g;
int64_t h;
int64_t i;
const struct Option_Option_NonZeroI64 *j;
const struct Option_i64 *j;
};
#ifdef __cplusplus
@@ -45,7 +45,7 @@ void root(struct NonZeroTest test,
int32_t g,
int64_t h,
int64_t i,
const struct Option_Option_NonZeroI64 *j);
const struct Option_i64 *j);
#ifdef __cplusplus
} // extern "C"
+3 -3
View File
@@ -19,7 +19,7 @@ cdef extern from *:
cdef extern from *:
cdef struct Option_Option_NonZeroI64:
cdef struct Option_i64:
pass
cdef struct NonZeroTest:
@@ -32,7 +32,7 @@ cdef extern from *:
int32_t g;
int64_t h;
int64_t i;
const Option_Option_NonZeroI64 *j;
const Option_i64 *j;
void root(NonZeroTest test,
uint8_t a,
@@ -44,4 +44,4 @@ cdef extern from *:
int32_t g,
int64_t h,
int64_t i,
const Option_Option_NonZeroI64 *j);
const Option_i64 *j);