File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,7 @@ Record *Program::getOrCreateRecord(const RecordDecl *RD) {
329
329
// Reserve space for fields.
330
330
Record::FieldList Fields;
331
331
for (const FieldDecl *FD : RD->fields ()) {
332
+ assert (FD == FD->getFirstDecl ());
332
333
// Note that we DO create fields and descriptors
333
334
// for unnamed bitfields here, even though we later ignore
334
335
// them everywhere. That's so the FieldDecl's getFieldIndex() matches.
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const std::string Record::getName() const {
37
37
}
38
38
39
39
const Record::Field *Record::getField (const FieldDecl *FD) const {
40
- auto It = FieldMap.find (FD);
40
+ auto It = FieldMap.find (FD-> getFirstDecl () );
41
41
assert (It != FieldMap.end () && " Missing field" );
42
42
return It->second ;
43
43
}
Original file line number Diff line number Diff line change 1
1
// RUN: rm -rf %t
2
2
// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fmodules-cache-path=%t %s -emit-llvm -o - | FileCheck %s
3
+ // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fmodules-cache-path=%t %s -emit-llvm -o - -fexperimental-new-constant-interpreter | FileCheck %s
3
4
4
5
// CHECK: @{{.*var.*}} = {{.*}} %union.union_type { i8 1 },
5
6
You can’t perform that action at this time.
0 commit comments