This is a follow up on https://reviews.llvm.org/D142459#4081179.
This first patch adds an overload to GlobalObject::setAlignment that accepts an Align type.
This already handles most of the calls.
This patch also converts a few call sites to the new type when this is safe.
Here is the list of the remaining call sites:
- clang/lib/CodeGen/CodeGenModule.cpp:1688
- llvm/lib/AsmParser/LLParser.cpp:1309
- llvm/lib/AsmParser/LLParser.cpp:6050
- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3871
- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:4030
- llvm/lib/IR/Core.cpp:2018
- llvm/lib/IR/Globals.cpp:141
- llvm/lib/Linker/IRMover.cpp:660
- llvm/lib/Linker/LinkModules.cpp:361
- llvm/lib/Linker/LinkModules.cpp:362
- llvm/lib/Transforms/IPO/MergeFunctions.cpp:782
- llvm/lib/Transforms/IPO/MergeFunctions.cpp:840
- llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1813
- llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp:27
Not sure I understand the point of overloading setAlignment; there's an implicit conversion from Align to MaybeAlign.