Skip to content

Commit

Permalink
[CIR][NFC] Cleanup warnings post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
bcardosolopes committed Nov 27, 2024
1 parent ffa0c9e commit 7c8ffe9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions clang/lib/CIR/CodeGen/CIRGenStmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *S,
switch (S->getStmtClass()) {
case Stmt::OMPScopeDirectiveClass:
llvm_unreachable("NYI");
case Stmt::OpenACCCombinedConstructClass:
case Stmt::OpenACCComputeConstructClass:
case Stmt::OpenACCLoopConstructClass:
case Stmt::OMPErrorDirectiveClass:
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/CIR/CodeGen/CIRGenTBAA.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ struct TBAAAccessInfo {
/// types to LLVM types.
class CIRGenTBAA {
mlir::MLIRContext *ctx;
clang::ASTContext &context;
CIRGenTypes &types;
[[maybe_unused]] clang::ASTContext &context;
[[maybe_unused]] CIRGenTypes &types;
mlir::ModuleOp moduleOp;
const clang::CodeGenOptions &codeGenOpts;
const clang::LangOptions &features;
[[maybe_unused]] const clang::CodeGenOptions &codeGenOpts;
[[maybe_unused]] const clang::LangOptions &features;

public:
CIRGenTBAA(mlir::MLIRContext *ctx, clang::ASTContext &context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,6 @@ void ItaniumRecordLayoutBuilder::finishLayout(const StructType D) {

// Finally, round the size of the record up to the alignment of the
// record itself.
uint64_t unpaddedSize = getSizeInBits() - UnfilledBitsInLastUnit;
uint64_t unpackedSizeInBits =
llvm::alignTo(getSizeInBits(), Context.toBits(UnpackedAlignment));

uint64_t roundedSize = llvm::alignTo(
getSizeInBits(),
Context.toBits(!Context.getTargetInfo().defaultsToAIXPowerAlignment()
Expand Down Expand Up @@ -549,10 +545,8 @@ void ItaniumRecordLayoutBuilder::checkFieldPadding(
// Warn if padding was introduced to the struct/class.
if (!IsUnion && Offset > UnpaddedOffset) {
unsigned padSize = Offset - UnpaddedOffset;
bool inBits = true;
if (padSize % CharBitNum == 0) {
padSize = padSize / CharBitNum;
inBits = false;
}
cir_cconv_assert(!cir::MissingFeatures::bitFieldPaddingDiagnostics());
}
Expand Down

0 comments on commit 7c8ffe9

Please sign in to comment.