Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
23ead47
[flang][mlir] Migrate to free create functions. NFC. (#164657)
kuhar Oct 22, 2025
47ea854
[flang] Update target rewrite to support workgroup and private attrib…
clementval Oct 22, 2025
866879f
[clang] Don't silently inherit the VFS from `FileManager` (#164323)
jansvoboda11 Oct 22, 2025
e2ad554
[Flang][mlir] - Translation of delayed privatization for deferred tar…
bhandarkar-pranav Oct 22, 2025
0e807a4
[SPIRV][HLSL] Fix assert with cbuffers through constexpr (#164555)
bogner Oct 22, 2025
e9c7966
[DirectX] Fix crash when naming buffers of arrays (#164553)
bogner Oct 22, 2025
735b1ad
[bazel] Fix Formatting (#164672)
boomanaiden154 Oct 22, 2025
6c8ad30
[flang][cuda] Do not consider function result as host array (#164669)
clementval Oct 22, 2025
c70d081
[MIR2Vec] Handle Operands (#163281)
svkeerthy Oct 22, 2025
99abda7
Revert "[clang-format] Annotate ::operator and Foo::operator correctl…
PiJoules Oct 22, 2025
04b5cc6
[clang-repl] Fix duplicate definition error for symbols in C mode (#1…
anutosh491 Oct 22, 2025
9fc353e
[libc] Fix a couple issues in <wchar.h> header (#164666)
vonosmas Oct 22, 2025
58d4f18
[libc][annex_k] Add Annex K support macros. (#163100)
bassiounix Oct 22, 2025
9a2e825
[clang][CIR][mlir] Migrate to free create functions. NFC. (#164656)
kuhar Oct 22, 2025
5d6c00c
[libc] Add -Werror for libc tests (#160413)
vinay-deshmukh Oct 22, 2025
25a915a
[ThinLTO] Add HasLocal flag to GlobalValueSummaryInfo (#164647)
teresajohnson Oct 22, 2025
10113c4
[bazel][libc] Add missing dependency (#164668)
googlewalt Oct 22, 2025
f8f7f1b
[lit] Update shtest-ulimit.py to explicitly check default limits (#16…
boomanaiden154 Oct 22, 2025
9a97717
[gn] port be9c083cf7ec (CAS on-disk changes)
nico Oct 22, 2025
f607b2a
[clang][Sema][NFC] Remove unused delayed template parsing cleanup cal…
localspook Oct 22, 2025
c0b42ec
[mlir][IR] Deprecate `OpBuilder::create` in favor of free functions (…
kuhar Oct 22, 2025
c597a4f
Revert "[libc] Add -Werror for libc tests" (#164684)
lntue Oct 22, 2025
a746fe5
[llvm-objdump] Fix --source with --macho flag (#163810)
rjmansfield Oct 22, 2025
ff6ed3d
[gn build] Port 18d4ba593db9
llvmgnsyncbot Oct 22, 2025
9313148
[gn build] Port 917384664076
llvmgnsyncbot Oct 22, 2025
a7f2cd3
[gn build] Port af6fa77a351e
llvmgnsyncbot Oct 22, 2025
8c04420
[gn build] Port e8b255df1bb4
llvmgnsyncbot Oct 22, 2025
8e7e9d4
[MemoryLocation] Support strided matrix loads / stores (#163368)
cofibrant Oct 22, 2025
3e6f696
[clang][deps] Fix a use-after-free from expanding response files (#16…
benlangmuir Oct 22, 2025
08619d8
[gn build] Port 18d4ba593db9
fmayer Oct 22, 2025
db2b7fe
[bazel] Fix MLIR Python tablegen deps after 5129b37 (#164690)
rnk Oct 22, 2025
12f0e48
[FlowSensitive] [StatusOr] [4/N] Support comparisons (#163871)
fmayer Oct 22, 2025
eb9574d
[ADT] Add `SmallVector::assign` overload for `ArrayRef` (#164680)
kuhar Oct 22, 2025
1808556
[ORC] Remove an unused member variable.
lhames Oct 22, 2025
f2c235a
[ubsan][test] Add allow-ubsan-check-divergence.c (#164673)
thurstond Oct 22, 2025
bfc322d
Revert "[VPlan] Run narrowInterleaveGroups during general VPlan optim…
fhahn Oct 22, 2025
c1678e5
[PAC][libunwind] Fix gcc build of libunwind and compiler-rt (#164535)
ojhunt Oct 22, 2025
81a9d75
[mlir][acc] Add mapping operation for firstprivate without counter (#…
razvanlupusoru Oct 22, 2025
07ed101
[flang][cuda] Support logical(4) in syncthread_and|count|or functions…
clementval Oct 22, 2025
a7672fe
[WebAssembly] Fixup test after bfc322dd724735.
fhahn Oct 22, 2025
f5fdd43
[clang] Refactor `ASTUnit::LoadFromASTFile()` (#164265)
jansvoboda11 Oct 22, 2025
764acd8
[FlowSensitive] [StatusOr] [5/N] Support absl::OkStatus et al (#163872)
fmayer Oct 22, 2025
b7c7083
[llvm] Update call graph ELF section type. (#164461)
Prabhuk Oct 22, 2025
515352b
[CAS][Unittest] Add a missing include (#164593)
kikairoya Oct 22, 2025
5754418
[bazel][mlir][acc] Port #164510 to bazel (#164717)
googlewalt Oct 22, 2025
bc294b3
merge main into amd-staging
ronlieb Oct 22, 2025
53ce339
Revert "[clang] Don't silently inherit the VFS from `FileManager` (#1…
ronlieb Oct 23, 2025
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
6 changes: 1 addition & 5 deletions clang/include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -1321,15 +1321,11 @@ class Sema final : public SemaBase {

/// Callback to the parser to parse templated functions when needed.
typedef void LateTemplateParserCB(void *P, LateParsedTemplate &LPT);
typedef void LateTemplateParserCleanupCB(void *P);
LateTemplateParserCB *LateTemplateParser;
LateTemplateParserCleanupCB *LateTemplateParserCleanup;
void *OpaqueParser;

void SetLateTemplateParser(LateTemplateParserCB *LTP,
LateTemplateParserCleanupCB *LTPCleanup, void *P) {
void SetLateTemplateParser(LateTemplateParserCB *LTP, void *P) {
LateTemplateParser = LTP;
LateTemplateParserCleanup = LTPCleanup;
OpaqueParser = P;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,37 @@ static auto valueOperatorCall() {
isStatusOrOperatorCallWithName("->")));
}

static clang::ast_matchers::TypeMatcher statusType() {
using namespace ::clang::ast_matchers; // NOLINT: Too many names
return hasCanonicalType(qualType(hasDeclaration(statusClass())));
}

static auto isComparisonOperatorCall(llvm::StringRef operator_name) {
using namespace ::clang::ast_matchers; // NOLINT: Too many names
return cxxOperatorCallExpr(
hasOverloadedOperatorName(operator_name), argumentCountIs(2),
hasArgument(0, anyOf(hasType(statusType()), hasType(statusOrType()))),
hasArgument(1, anyOf(hasType(statusType()), hasType(statusOrType()))));
}

static auto isOkStatusCall() {
using namespace ::clang::ast_matchers; // NOLINT: Too many names
return callExpr(callee(functionDecl(hasName("::absl::OkStatus"))));
}

static auto isNotOkStatusCall() {
using namespace ::clang::ast_matchers; // NOLINT: Too many names
return callExpr(callee(functionDecl(hasAnyName(
"::absl::AbortedError", "::absl::AlreadyExistsError",
"::absl::CancelledError", "::absl::DataLossError",
"::absl::DeadlineExceededError", "::absl::FailedPreconditionError",
"::absl::InternalError", "::absl::InvalidArgumentError",
"::absl::NotFoundError", "::absl::OutOfRangeError",
"::absl::PermissionDeniedError", "::absl::ResourceExhaustedError",
"::absl::UnauthenticatedError", "::absl::UnavailableError",
"::absl::UnimplementedError", "::absl::UnknownError"))));
}

static auto
buildDiagnoseMatchSwitch(const UncheckedStatusOrAccessModelOptions &Options) {
return CFGMatchSwitchBuilder<const Environment,
Expand Down Expand Up @@ -312,6 +343,118 @@ static void transferStatusUpdateCall(const CXXMemberCallExpr *Expr,
State.Env.setValue(locForOk(*ThisLoc), NewVal);
}

static BoolValue *evaluateStatusEquality(RecordStorageLocation &LhsStatusLoc,
RecordStorageLocation &RhsStatusLoc,
Environment &Env) {
auto &A = Env.arena();
// Logically, a Status object is composed of an error code that could take one
// of multiple possible values, including the "ok" value. We track whether a
// Status object has an "ok" value and represent this as an `ok` bit. Equality
// of Status objects compares their error codes. Therefore, merely comparing
// the `ok` bits isn't sufficient: when two Status objects are assigned non-ok
// error codes the equality of their respective error codes matters. Since we
// only track the `ok` bits, we can't make any conclusions about equality when
// we know that two Status objects have non-ok values.

auto &LhsOkVal = valForOk(LhsStatusLoc, Env);
auto &RhsOkVal = valForOk(RhsStatusLoc, Env);

auto &Res = Env.makeAtomicBoolValue();

// lhs && rhs => res (a.k.a. !res => !lhs || !rhs)
Env.assume(A.makeImplies(A.makeAnd(LhsOkVal.formula(), RhsOkVal.formula()),
Res.formula()));
// res => (lhs == rhs)
Env.assume(A.makeImplies(
Res.formula(), A.makeEquals(LhsOkVal.formula(), RhsOkVal.formula())));

return &Res;
}

static BoolValue *
evaluateStatusOrEquality(RecordStorageLocation &LhsStatusOrLoc,
RecordStorageLocation &RhsStatusOrLoc,
Environment &Env) {
auto &A = Env.arena();
// Logically, a StatusOr<T> object is composed of two values - a Status and a
// value of type T. Equality of StatusOr objects compares both values.
// Therefore, merely comparing the `ok` bits of the Status values isn't
// sufficient. When two StatusOr objects are engaged, the equality of their
// respective values of type T matters. Similarly, when two StatusOr objects
// have Status values that have non-ok error codes, the equality of the error
// codes matters. Since we only track the `ok` bits of the Status values, we
// can't make any conclusions about equality when we know that two StatusOr
// objects are engaged or when their Status values contain non-ok error codes.
auto &LhsOkVal = valForOk(locForStatus(LhsStatusOrLoc), Env);
auto &RhsOkVal = valForOk(locForStatus(RhsStatusOrLoc), Env);
auto &res = Env.makeAtomicBoolValue();

// res => (lhs == rhs)
Env.assume(A.makeImplies(
res.formula(), A.makeEquals(LhsOkVal.formula(), RhsOkVal.formula())));
return &res;
}

static BoolValue *evaluateEquality(const Expr *LhsExpr, const Expr *RhsExpr,
Environment &Env) {
// Check the type of both sides in case an operator== is added that admits
// different types.
if (isStatusOrType(LhsExpr->getType()) &&
isStatusOrType(RhsExpr->getType())) {
auto *LhsStatusOrLoc = Env.get<RecordStorageLocation>(*LhsExpr);
if (LhsStatusOrLoc == nullptr)
return nullptr;
auto *RhsStatusOrLoc = Env.get<RecordStorageLocation>(*RhsExpr);
if (RhsStatusOrLoc == nullptr)
return nullptr;

return evaluateStatusOrEquality(*LhsStatusOrLoc, *RhsStatusOrLoc, Env);
}
if (isStatusType(LhsExpr->getType()) && isStatusType(RhsExpr->getType())) {
auto *LhsStatusLoc = Env.get<RecordStorageLocation>(*LhsExpr);
if (LhsStatusLoc == nullptr)
return nullptr;

auto *RhsStatusLoc = Env.get<RecordStorageLocation>(*RhsExpr);
if (RhsStatusLoc == nullptr)
return nullptr;

return evaluateStatusEquality(*LhsStatusLoc, *RhsStatusLoc, Env);
}
return nullptr;
}

static void transferComparisonOperator(const CXXOperatorCallExpr *Expr,
LatticeTransferState &State,
bool IsNegative) {
auto *LhsAndRhsVal =
evaluateEquality(Expr->getArg(0), Expr->getArg(1), State.Env);
if (LhsAndRhsVal == nullptr)
return;

if (IsNegative)
State.Env.setValue(*Expr, State.Env.makeNot(*LhsAndRhsVal));
else
State.Env.setValue(*Expr, *LhsAndRhsVal);
}

static void transferOkStatusCall(const CallExpr *Expr,
const MatchFinder::MatchResult &,
LatticeTransferState &State) {
auto &OkVal =
initializeStatus(State.Env.getResultObjectLocation(*Expr), State.Env);
State.Env.assume(OkVal.formula());
}

static void transferNotOkStatusCall(const CallExpr *Expr,
const MatchFinder::MatchResult &,
LatticeTransferState &State) {
auto &OkVal =
initializeStatus(State.Env.getResultObjectLocation(*Expr), State.Env);
auto &A = State.Env.arena();
State.Env.assume(A.makeNot(OkVal.formula()));
}

CFGMatchSwitch<LatticeTransferState>
buildTransferMatchSwitch(ASTContext &Ctx,
CFGMatchSwitchBuilder<LatticeTransferState> Builder) {
Expand All @@ -325,6 +468,22 @@ buildTransferMatchSwitch(ASTContext &Ctx,
transferStatusOkCall)
.CaseOfCFGStmt<CXXMemberCallExpr>(isStatusMemberCallWithName("Update"),
transferStatusUpdateCall)
.CaseOfCFGStmt<CXXOperatorCallExpr>(
isComparisonOperatorCall("=="),
[](const CXXOperatorCallExpr *Expr, const MatchFinder::MatchResult &,
LatticeTransferState &State) {
transferComparisonOperator(Expr, State,
/*IsNegative=*/false);
})
.CaseOfCFGStmt<CXXOperatorCallExpr>(
isComparisonOperatorCall("!="),
[](const CXXOperatorCallExpr *Expr, const MatchFinder::MatchResult &,
LatticeTransferState &State) {
transferComparisonOperator(Expr, State,
/*IsNegative=*/true);
})
.CaseOfCFGStmt<CallExpr>(isOkStatusCall(), transferOkStatusCall)
.CaseOfCFGStmt<CallExpr>(isNotOkStatusCall(), transferNotOkStatusCall)
.Build();
}

Expand Down
6 changes: 3 additions & 3 deletions clang/lib/CIR/CodeGen/CIRGenAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ mlir::LogicalResult CIRGenFunction::emitAsmStmt(const AsmStmt &s) {

bool hasSideEffect = s.isVolatile() || s.getNumOutputs() == 0;

cir::InlineAsmOp ia = builder.create<cir::InlineAsmOp>(
getLoc(s.getAsmLoc()), resultType, operands, asmString, constraints,
hasSideEffect, inferFlavor(cgm, s), mlir::ArrayAttr());
cir::InlineAsmOp ia = cir::InlineAsmOp::create(
builder, getLoc(s.getAsmLoc()), resultType, operands, asmString,
constraints, hasSideEffect, inferFlavor(cgm, s), mlir::ArrayAttr());

if (isGCCAsmGoto) {
assert(!cir::MissingFeatures::asmGoto());
Expand Down
20 changes: 10 additions & 10 deletions clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ static RValue emitBuiltinBitOp(CIRGenFunction &cgf, const CallExpr *e,
Op op;
if constexpr (std::is_same_v<Op, cir::BitClzOp> ||
std::is_same_v<Op, cir::BitCtzOp>)
op = builder.create<Op>(cgf.getLoc(e->getSourceRange()), arg, poisonZero);
op = Op::create(builder, cgf.getLoc(e->getSourceRange()), arg, poisonZero);
else
op = builder.create<Op>(cgf.getLoc(e->getSourceRange()), arg);
op = Op::create(builder, cgf.getLoc(e->getSourceRange()), arg);

mlir::Value result = op.getResult();
mlir::Type exprTy = cgf.convertType(e->getType());
Expand All @@ -67,8 +67,8 @@ RValue CIRGenFunction::emitRotate(const CallExpr *e, bool isRotateLeft) {
// to the type of input when necessary.
assert(!cir::MissingFeatures::msvcBuiltins());

auto r = builder.create<cir::RotateOp>(getLoc(e->getSourceRange()), input,
amount, isRotateLeft);
auto r = cir::RotateOp::create(builder, getLoc(e->getSourceRange()), input,
amount, isRotateLeft);
return RValue::get(r);
}

Expand Down Expand Up @@ -227,14 +227,14 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
return RValue::get(nullptr);

mlir::Value argValue = emitCheckedArgForAssume(e->getArg(0));
builder.create<cir::AssumeOp>(loc, argValue);
cir::AssumeOp::create(builder, loc, argValue);
return RValue::get(nullptr);
}

case Builtin::BI__builtin_assume_separate_storage: {
mlir::Value value0 = emitScalarExpr(e->getArg(0));
mlir::Value value1 = emitScalarExpr(e->getArg(1));
builder.create<cir::AssumeSepStorageOp>(loc, value0, value1);
cir::AssumeSepStorageOp::create(builder, loc, value0, value1);
return RValue::get(nullptr);
}

Expand Down Expand Up @@ -363,8 +363,8 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
probability);
}

auto result = builder.create<cir::ExpectOp>(
loc, argValue.getType(), argValue, expectedValue, probAttr);
auto result = cir::ExpectOp::create(builder, loc, argValue.getType(),
argValue, expectedValue, probAttr);
return RValue::get(result);
}

Expand All @@ -375,15 +375,15 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
case Builtin::BI_byteswap_ulong:
case Builtin::BI_byteswap_uint64: {
mlir::Value arg = emitScalarExpr(e->getArg(0));
return RValue::get(builder.create<cir::ByteSwapOp>(loc, arg));
return RValue::get(cir::ByteSwapOp::create(builder, loc, arg));
}

case Builtin::BI__builtin_bitreverse8:
case Builtin::BI__builtin_bitreverse16:
case Builtin::BI__builtin_bitreverse32:
case Builtin::BI__builtin_bitreverse64: {
mlir::Value arg = emitScalarExpr(e->getArg(0));
return RValue::get(builder.create<cir::BitReverseOp>(loc, arg));
return RValue::get(cir::BitReverseOp::create(builder, loc, arg));
}

case Builtin::BI__builtin_rotateleft8:
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CIR/CodeGen/CIRGenCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void emitDeclDestroy(CIRGenFunction &cgf, const VarDecl *vd,
// Don't confuse lexical cleanup.
builder.clearInsertionPoint();
} else {
builder.create<cir::YieldOp>(addr.getLoc());
cir::YieldOp::create(builder, addr.getLoc());
}
}

Expand Down
7 changes: 4 additions & 3 deletions clang/lib/CIR/CodeGen/CIRGenClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,9 @@ void CIRGenFunction::emitCXXAggrConstructorCall(
// Emit the constructor call that will execute for every array element.
mlir::Value arrayOp =
builder.createPtrBitcast(arrayBase.getPointer(), arrayTy);
builder.create<cir::ArrayCtor>(
*currSrcLoc, arrayOp, [&](mlir::OpBuilder &b, mlir::Location loc) {
cir::ArrayCtor::create(
builder, *currSrcLoc, arrayOp,
[&](mlir::OpBuilder &b, mlir::Location loc) {
mlir::BlockArgument arg =
b.getInsertionBlock()->addArgument(ptrToElmType, loc);
Address curAddr = Address(arg, elementType, eltAlignment);
Expand All @@ -738,7 +739,7 @@ void CIRGenFunction::emitCXXAggrConstructorCall(
emitCXXConstructorCall(ctor, Ctor_Complete,
/*ForVirtualBase=*/false,
/*Delegating=*/false, currAVS, e);
builder.create<cir::YieldOp>(loc);
cir::YieldOp::create(builder, loc);
});
}
}
Expand Down
30 changes: 15 additions & 15 deletions clang/lib/CIR/CodeGen/CIRGenExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ void CIRGenFunction::emitStoreThroughLValue(RValue src, LValue dst,
const mlir::Location loc = dst.getVectorPointer().getLoc();
const mlir::Value vector =
builder.createLoad(loc, dst.getVectorAddress());
const mlir::Value newVector = builder.create<cir::VecInsertOp>(
loc, vector, src.getValue(), dst.getVectorIdx());
const mlir::Value newVector = cir::VecInsertOp::create(
builder, loc, vector, src.getValue(), dst.getVectorIdx());
builder.createStore(loc, newVector, dst.getVectorAddress());
return;
}
Expand Down Expand Up @@ -615,8 +615,8 @@ RValue CIRGenFunction::emitLoadOfLValue(LValue lv, SourceLocation loc) {
if (lv.isVectorElt()) {
const mlir::Value load =
builder.createLoad(getLoc(loc), lv.getVectorAddress());
return RValue::get(builder.create<cir::VecExtractOp>(getLoc(loc), load,
lv.getVectorIdx()));
return RValue::get(cir::VecExtractOp::create(builder, getLoc(loc), load,
lv.getVectorIdx()));
}

cgm.errorNYI(loc, "emitLoadOfLValue");
Expand Down Expand Up @@ -1685,8 +1685,8 @@ CIRGenCallee CIRGenFunction::emitDirectCallee(const GlobalDecl &gd) {
mlir::OpBuilder::InsertionGuard guard(builder);
builder.setInsertionPointToStart(cgm.getModule().getBody());

clone = builder.create<cir::FuncOp>(calleeFunc.getLoc(), fdInlineName,
calleeFunc.getFunctionType());
clone = cir::FuncOp::create(builder, calleeFunc.getLoc(), fdInlineName,
calleeFunc.getFunctionType());
clone.setLinkageAttr(cir::GlobalLinkageKindAttr::get(
&cgm.getMLIRContext(), cir::GlobalLinkageKind::InternalLinkage));
clone.setSymVisibility("private");
Expand Down Expand Up @@ -1778,8 +1778,8 @@ RValue CIRGenFunction::emitCall(clang::QualType calleeTy,
mlir::Operation *fn = callee.getFunctionPointer();
mlir::Value addr;
if (auto funcOp = mlir::dyn_cast<cir::FuncOp>(fn)) {
addr = builder.create<cir::GetGlobalOp>(
getLoc(e->getSourceRange()),
addr = cir::GetGlobalOp::create(
builder, getLoc(e->getSourceRange()),
cir::PointerType::get(funcOp.getFunctionType()), funcOp.getSymName());
} else {
addr = fn->getResult(0);
Expand Down Expand Up @@ -1996,9 +1996,9 @@ cir::IfOp CIRGenFunction::emitIfOnBoolExpr(

// Emit the code with the fully general case.
mlir::Value condV = emitOpOnBoolExpr(loc, cond);
return builder.create<cir::IfOp>(loc, condV, elseLoc.has_value(),
/*thenBuilder=*/thenBuilder,
/*elseBuilder=*/elseBuilder);
return cir::IfOp::create(builder, loc, condV, elseLoc.has_value(),
/*thenBuilder=*/thenBuilder,
/*elseBuilder=*/elseBuilder);
}

/// TODO(cir): see EmitBranchOnBoolExpr for extra ideas).
Expand All @@ -2025,12 +2025,12 @@ mlir::Value CIRGenFunction::emitOpOnBoolExpr(mlir::Location loc,
loc, condV, /*thenBuilder=*/
[this, trueExpr](mlir::OpBuilder &b, mlir::Location loc) {
mlir::Value lhs = emitScalarExpr(trueExpr);
b.create<cir::YieldOp>(loc, lhs);
cir::YieldOp::create(b, loc, lhs);
},
/*elseBuilder=*/
[this, falseExpr](mlir::OpBuilder &b, mlir::Location loc) {
mlir::Value rhs = emitScalarExpr(falseExpr);
b.create<cir::YieldOp>(loc, rhs);
cir::YieldOp::create(b, loc, rhs);
})
.getResult();

Expand Down Expand Up @@ -2211,8 +2211,8 @@ Address CIRGenFunction::emitLoadOfReference(LValue refLVal, mlir::Location loc,
cgm.errorNYI(loc, "load of volatile reference");

cir::LoadOp load =
builder.create<cir::LoadOp>(loc, refLVal.getAddress().getElementType(),
refLVal.getAddress().getPointer());
cir::LoadOp::create(builder, loc, refLVal.getAddress().getElementType(),
refLVal.getAddress().getPointer());

assert(!cir::MissingFeatures::opTBAA());

Expand Down
Loading