Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions clang/lib/CIR/CodeGen/CIRGenExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1362,10 +1362,9 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *E) {
QualType T = ExprTy->castAs<clang::ComplexType>()->getElementType();

auto Loc = getLoc(E->getExprLoc());
Address Component =
(E->getOpcode() == UO_Real
? emitAddrOfRealComponent(Loc, LV.getAddress(), LV.getType())
: emitAddrOfImagComponent(Loc, LV.getAddress(), LV.getType()));
Address Component = E->getOpcode() == UO_Real
? builder.createRealPtr(Loc, LV.getAddress())
: builder.createImagPtr(Loc, LV.getAddress());
LValue ElemLV = makeAddrLValue(Component, T, LV.getBaseInfo(),
CGM.getTBAAInfoForSubobject(LV, T));
ElemLV.getQuals().addQualifiers(LV.getQuals());
Expand Down
Loading
Loading