[PATCH] D68274: [Alignment][Clang][NFC] Add CharUnits::getAsAlign
Clement Courbet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 3 05:37:20 PDT 2019
courbet added inline comments.
================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:2021
// of the string is via this class initializer.
- GV->setAlignment(1);
+ GV->setAlignment(llvm::Align(1));
Fields.addBitCast(GV, CGM.Int8PtrTy);
----------------
I think the semantic is None here.
================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:6323
GV->setSection("__DATA, __objc_data");
- GV->setAlignment(
- CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ClassnfABITy));
+ GV->setAlignment(llvm::Align(
+ CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ClassnfABITy)));
----------------
I don;t think `getABITypeAlignment` makes any promisses on the return value.
================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:6764
+ IvarOffsetGV->setAlignment(llvm::Align(
+ CGM.getDataLayout().getABITypeAlignment(ObjCTypes.IvarOffsetVarTy)));
----------------
ditto
================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:6991
+ PTGV->setAlignment(llvm::Align(
+ CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ProtocolnfABIPtrTy)));
PTGV->setSection(GetSectionName("__objc_protolist",
----------------
ditto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68274/new/
https://reviews.llvm.org/D68274
More information about the cfe-commits
mailing list