Skip to content

Commit 7c8ffe9

Browse files
committed
[CIR][NFC] Cleanup warnings post rebase
1 parent ffa0c9e commit 7c8ffe9

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

clang/lib/CIR/CodeGen/CIRGenStmt.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *S,
101101
switch (S->getStmtClass()) {
102102
case Stmt::OMPScopeDirectiveClass:
103103
llvm_unreachable("NYI");
104+
case Stmt::OpenACCCombinedConstructClass:
104105
case Stmt::OpenACCComputeConstructClass:
105106
case Stmt::OpenACCLoopConstructClass:
106107
case Stmt::OMPErrorDirectiveClass:

clang/lib/CIR/CodeGen/CIRGenTBAA.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ struct TBAAAccessInfo {
9898
/// types to LLVM types.
9999
class CIRGenTBAA {
100100
mlir::MLIRContext *ctx;
101-
clang::ASTContext &context;
102-
CIRGenTypes &types;
101+
[[maybe_unused]] clang::ASTContext &context;
102+
[[maybe_unused]] CIRGenTypes &types;
103103
mlir::ModuleOp moduleOp;
104-
const clang::CodeGenOptions &codeGenOpts;
105-
const clang::LangOptions &features;
104+
[[maybe_unused]] const clang::CodeGenOptions &codeGenOpts;
105+
[[maybe_unused]] const clang::LangOptions &features;
106106

107107
public:
108108
CIRGenTBAA(mlir::MLIRContext *ctx, clang::ASTContext &context,

clang/lib/CIR/Dialect/Transforms/TargetLowering/RecordLayoutBuilder.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,6 @@ void ItaniumRecordLayoutBuilder::finishLayout(const StructType D) {
487487

488488
// Finally, round the size of the record up to the alignment of the
489489
// record itself.
490-
uint64_t unpaddedSize = getSizeInBits() - UnfilledBitsInLastUnit;
491-
uint64_t unpackedSizeInBits =
492-
llvm::alignTo(getSizeInBits(), Context.toBits(UnpackedAlignment));
493-
494490
uint64_t roundedSize = llvm::alignTo(
495491
getSizeInBits(),
496492
Context.toBits(!Context.getTargetInfo().defaultsToAIXPowerAlignment()
@@ -549,10 +545,8 @@ void ItaniumRecordLayoutBuilder::checkFieldPadding(
549545
// Warn if padding was introduced to the struct/class.
550546
if (!IsUnion && Offset > UnpaddedOffset) {
551547
unsigned padSize = Offset - UnpaddedOffset;
552-
bool inBits = true;
553548
if (padSize % CharBitNum == 0) {
554549
padSize = padSize / CharBitNum;
555-
inBits = false;
556550
}
557551
cir_cconv_assert(!cir::MissingFeatures::bitFieldPaddingDiagnostics());
558552
}

0 commit comments

Comments
 (0)