Skip to content

Fix ExtractMemberOp and InsertMemberOp constraints #1630

Open
@bcardosolopes

Description

@bcardosolopes

Seems like it's supposed to only get records but we are also passing methods for it (introduced in #1292). @Lancern can you clarify the intent?

void ItaniumCXXABI::lowerGetMethod(
  ...
  mlir::Value &callee = loweredResults[0];
  mlir::Value &adjustedThis = loweredResults[1];
  mlir::Type calleePtrTy = op.getCallee().getType();

  cir::IntType ptrdiffCIRTy = getPtrDiffCIRTy(LM);
  mlir::Value ptrdiffOne = rewriter.create<cir::ConstantOp>(
      op.getLoc(), cir::IntAttr::get(ptrdiffCIRTy, 1));

  mlir::Value adj = rewriter.create<cir::ExtractMemberOp>(
      op.getLoc(), ptrdiffCIRTy, loweredMethod, 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions