Skip to content

Commit 07ced7f

Browse files
committed
[CIR][NFC] Restructure CIRGenExprComplex to be similar to upstream
1 parent a8000bb commit 07ced7f

File tree

3 files changed

+642
-638
lines changed

3 files changed

+642
-638
lines changed

clang/lib/CIR/CodeGen/CIRGenExpr.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,10 +1362,9 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *E) {
13621362
QualType T = ExprTy->castAs<clang::ComplexType>()->getElementType();
13631363

13641364
auto Loc = getLoc(E->getExprLoc());
1365-
Address Component =
1366-
(E->getOpcode() == UO_Real
1367-
? emitAddrOfRealComponent(Loc, LV.getAddress(), LV.getType())
1368-
: emitAddrOfImagComponent(Loc, LV.getAddress(), LV.getType()));
1365+
Address Component = E->getOpcode() == UO_Real
1366+
? builder.createRealPtr(Loc, LV.getAddress())
1367+
: builder.createImagPtr(Loc, LV.getAddress());
13691368
LValue ElemLV = makeAddrLValue(Component, T, LV.getBaseInfo(),
13701369
CGM.getTBAAInfoForSubobject(LV, T));
13711370
ElemLV.getQuals().addQualifiers(LV.getQuals());

0 commit comments

Comments
 (0)