[PATCH] D142459: [clang] Deprecate uses of GlobalObject::getAlignment
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 05:56:49 PST 2023
courbet added inline comments.
================
Comment at: clang/include/clang/AST/CharUnits.h:73
+ /// fromQuantity - Construct a CharUnits quantity from an llvm::Align
+ /// quantity.
----------------
`Maybe`*
================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:1991
+ return ConstantAddress(C, C->getValueType(),
+ CharUnits::fromQuantity(C->getAlign()));
----------------
I'm wondering whetehr we could just do away with this conversion and store a `MaybeAlign` in `GlobalValue` instead.
The only uses of `Address::getAlign()` is to creata another `Address` or do `Address::getAlign()->getAsAlign()`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142459/new/
https://reviews.llvm.org/D142459
More information about the llvm-commits
mailing list