Skip to content

Commit 2a5908b

Browse files
committed
Apply review feedback
1 parent 30e5276 commit 2a5908b

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

clang/lib/CIR/CodeGen/Address.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "mlir/IR/Value.h"
1818
#include "clang/AST/CharUnits.h"
1919
#include "clang/CIR/Dialect/IR/CIRTypes.h"
20+
#include "clang/CIR/MissingFeatures.h"
2021
#include "llvm/ADT/PointerIntPair.h"
2122

2223
namespace clang::CIRGen {
@@ -93,7 +94,7 @@ class Address {
9394
/// Return the pointer contained in this class after authenticating it and
9495
/// adding offset to it if necessary.
9596
mlir::Value emitRawPointer() const {
96-
// TODO(cir): update this class with latest traditional LLVM codegen bits
97+
assert(!cir::MissingFeatures::addressPointerAuthInfo());
9798
return getBasePointer();
9899
}
99100

clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ RValue CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(
174174
// CIRGen does not pass CallOrInvoke here (different from OG LLVM codegen)
175175
// because in practice it always null even in OG.
176176
emitCXXDestructorCall(globalDecl, callee, thisPtr.getPointer(), thisTy,
177-
/*ImplicitParam=*/nullptr,
178-
/*ImplicitParamTy=*/QualType(), ce);
177+
/*implicitParam=*/nullptr,
178+
/*implicitParamTy=*/QualType(), ce);
179179
}
180180
return RValue::get(nullptr);
181181
}

clang/lib/CIR/CodeGen/CIRGenFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,8 @@ void CIRGenFunction::emitDestructorBody(FunctionArgList &args) {
682682
enterDtorCleanups(dtor, Dtor_Deleting);
683683
if (haveInsertPoint()) {
684684
QualType thisTy = dtor->getFunctionObjectParameterType();
685-
emitCXXDestructorCall(dtor, Dtor_Complete, /*ForVirtualBase=*/false,
686-
/*Delegating=*/false, loadCXXThisAddress(), thisTy);
685+
emitCXXDestructorCall(dtor, Dtor_Complete, /*forVirtualBase=*/false,
686+
/*delegating=*/false, loadCXXThisAddress(), thisTy);
687687
}
688688
return;
689689
}

clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,8 @@ mlir::Value CIRGenItaniumCXXABI::emitVirtualDestructorCall(
483483
const cir::FuncType &fnTy = cgm.getTypes().getFunctionType(*fnInfo);
484484
auto callee = CIRGenCallee::forVirtual(callExpr, globalDecl, thisAddr, fnTy);
485485

486-
QualType thisTy;
487-
if (callExpr)
488-
thisTy = callExpr->getObjectType();
489-
else
490-
thisTy = delExpr->getDestroyedType();
486+
QualType thisTy =
487+
callExpr ? callExpr->getObjectType() : delExpr->getDestroyedType();
491488

492489
cgf.emitCXXDestructorCall(globalDecl, callee, thisAddr.emitRawPointer(),
493490
thisTy, nullptr, QualType(), nullptr);

0 commit comments

Comments
 (0)