Skip to content

Commit

Permalink
Mark places that diverges from original CodeGen on CXXABI use
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancern committed Jan 20, 2024
1 parent d87b4c1 commit c2e33c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,8 @@ mlir::Value CIRGenFunction::getVTablePtr(SourceLocation Loc, Address This,
Address CIRGenFunction::buildCXXMemberDataPointerAddress(
const Expr *E, Address base, mlir::Value memberPtr,
const MemberPointerType *memberPtrType, LValueBaseInfo *baseInfo) {
assert(!UnimplementedFeature::cxxABI());

auto op = builder.createGetIndirectMember(getLoc(E->getSourceRange()),
base.getPointer(), memberPtr);

Expand Down
4 changes: 4 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenExprConst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,8 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const APValue &Value,
Elts, typedFiller);
}
case APValue::MemberPointer: {
assert(!UnimplementedFeature::cxxABI());

const ValueDecl *memberDecl = Value.getMemberPointerDecl();
assert(!Value.isMemberPointerToDerivedMember() && "NYI");

Expand Down Expand Up @@ -1584,6 +1586,8 @@ mlir::Value CIRGenModule::buildNullConstant(QualType T, mlir::Location loc) {
}

mlir::Value CIRGenModule::buildMemberPointerConstant(const UnaryOperator *E) {
assert(!UnimplementedFeature::cxxABI());

auto loc = getLoc(E->getSourceRange());
auto ty = getCIRType(E->getType()).cast<mlir::cir::MemberPtrType>();

Expand Down

0 comments on commit c2e33c5

Please sign in to comment.