File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
tools/cgeist/Test/Verification Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -247,8 +247,10 @@ struct ConvertToOpaquePtrPass
247
247
}
248
248
for (auto ty : st.getBody ()) {
249
249
StringRef fieldKey = " " ;
250
- if (auto fieldST = ty.dyn_cast <LLVM::LLVMStructType>())
251
- fieldKey = fieldST.getName ();
250
+ if (auto fieldST = ty.dyn_cast <LLVM::LLVMStructType>()) {
251
+ if (fieldST.isIdentified ())
252
+ fieldKey = fieldST.getName ();
253
+ }
252
254
if (typeCache.find (fieldKey) != typeCache.end ()) {
253
255
bodyTypes.push_back (typeCache[fieldKey]);
254
256
} else {
Original file line number Diff line number Diff line change
1
+ // RUN: cgeist %s %stdinclude -S | FileCheck %s
2
+
3
+ struct Str {
4
+ int a;
5
+ float b;
6
+ };
7
+
8
+ struct OperandInfo {
9
+ OperandInfo *info;
10
+ struct {
11
+ int a;
12
+ float b;
13
+ } intfloat;
14
+ Str a;
15
+ Str *b;
16
+ int c;
17
+ };
18
+
19
+ void *foo (OperandInfo *info) {
20
+ return info;
21
+ }
22
+
23
+ // CHECK: memref<?x!llvm.struct<"opaque@polygeist@[email protected] ", (memref<?x!llvm.struct<"opaque@polygeist@[email protected] ">>, struct<(i32, f32)>, struct<(i32, f32)>, memref<?x!llvm.struct<(i32, f32)>>, i32)>>
You can’t perform that action at this time.
0 commit comments