File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1012,7 +1012,8 @@ mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *E) {
1012
1012
1013
1013
LValue CIRGenFunction::buildUnaryOpLValue (const UnaryOperator *E) {
1014
1014
// __extension__ doesn't affect lvalue-ness.
1015
- assert (E->getOpcode () != UO_Extension && " not implemented" );
1015
+ if (E->getOpcode () == UO_Extension)
1016
+ return buildLValue (E->getSubExpr ());
1016
1017
1017
1018
switch (E->getOpcode ()) {
1018
1019
default :
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ int foo(void) { return __extension__ 0b101010; }
9
9
//CHECK-NEXT: cir.store [[VAL]], [[ADDR]] : !s32i, cir.ptr <!s32i>
10
10
//CHECK-NEXT: [[LOAD_VAL:%.*]] = cir.load [[ADDR]] : cir.ptr <!s32i>, !s32i
11
11
//CHECK-NEXT: cir.return [[LOAD_VAL]] : !s32i
12
+
13
+ void bar (void ) {
14
+ __extension__ bar ;
15
+ }
16
+
17
+ //CHECK: cir.func @bar()
18
+ //CHECK: {{.*}} = cir.get_global @bar : cir.ptr <!cir.func<!void ()>>
19
+ //CHECK: cir.return
You can’t perform that action at this time.
0 commit comments