Skip to content

Commit 5b553af

Browse files
committed
Missing features
1 parent 87a64dc commit 5b553af

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ struct MissingFeatures {
229229
static bool emitConstrainedFPCall() { return false; }
230230
static bool emitEmptyRecordCheck() { return false; }
231231
static bool isPPC_FP128Ty() { return false; }
232+
static bool emitBinaryAtomicPostHasInvert() { return false; }
232233

233234
// Inline assembly
234235
static bool asmGoto() { return false; }

clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ static RValue emitBinaryAtomicPost(CIRGenFunction &cgf,
297297
clang::CIRGen::CIRGenBuilderTy &builder = cgf.getBuilder();
298298
result = builder.create<cir::BinOp>(result.getLoc(), binopKind, result, val);
299299
result = emitFromInt(cgf, result, typ, valueType);
300+
// FIXME: Some callers of this function expect the result to be inverted,
301+
// which would need invert flag passed in and do the inversion here like
302+
// traditional clang code gen does. When we implment those caller builtins
303+
// we should implement the inversion here.
304+
assert(!MissingFeatures::emitBinaryAtomicPostHasInvert());
300305
return RValue::get(result);
301306
}
302307

0 commit comments

Comments
 (0)