Skip to content

Commit e0b1d80

Browse files
committed
m68k alignments have been (partially) fixed
1 parent af31642 commit e0b1d80

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,16 +358,14 @@ static void checkDataLayoutConsistency(const TargetInfo &Target,
358358
Target.BoolAlign);
359359
Check("short", llvm::Type::getIntNTy(Context, Target.ShortWidth),
360360
Target.ShortAlign);
361-
// FIXME: M68k specifies incorrect wrong int and long alignments in Clang
362-
// and incorrect long long alignment in both LLVM and Clang.
363-
if (Triple.getArch() != llvm::Triple::m68k) {
364-
Check("int", llvm::Type::getIntNTy(Context, Target.IntWidth),
365-
Target.IntAlign);
366-
Check("long", llvm::Type::getIntNTy(Context, Target.LongWidth),
367-
Target.LongAlign);
361+
Check("int", llvm::Type::getIntNTy(Context, Target.IntWidth),
362+
Target.IntAlign);
363+
Check("long", llvm::Type::getIntNTy(Context, Target.LongWidth),
364+
Target.LongAlign);
365+
// FIXME: M68k specifies incorrect long long alignment in both LLVM and Clang.
366+
if (Triple.getArch() != llvm::Triple::m68k)
368367
Check("long long", llvm::Type::getIntNTy(Context, Target.LongLongWidth),
369368
Target.LongLongAlign);
370-
}
371369
// FIXME: There are int128 alignment mismatches on multiple targets.
372370
if (Target.hasInt128Type() && !Target.getTargetOpts().ForceEnableInt128 &&
373371
!Triple.isAMDGPU() && !Triple.isSPIRV() &&
@@ -396,9 +394,7 @@ static void checkDataLayoutConsistency(const TargetInfo &Target,
396394
if (Target.hasIbm128Type())
397395
Check("__ibm128", llvm::Type::getPPC_FP128Ty(Context), Target.Ibm128Align);
398396

399-
// FIXME: Clang specifies incorrect pointer alignment for m68k.
400-
if (Triple.getArch() != llvm::Triple::m68k)
401-
Check("void*", llvm::PointerType::getUnqual(Context), Target.PointerAlign);
397+
Check("void*", llvm::PointerType::getUnqual(Context), Target.PointerAlign);
402398
#endif
403399
}
404400

0 commit comments

Comments
 (0)