efriedma added subscribers: mgrang, rsmith. efriedma added a comment. I was going to ask if local variables are also supposed to be aligned this way... but I guess there's no way for standard C++ code to tell without explicitly making weird alignment assumptions, so let's not worry about that.
This should do the right thing, as far as I can tell. It probably would make sense to refactor the arm64-specific code into a TargetInfo API... or at least the triple check. Not sure what that would look like; maybe `virtual uint64_t getMinGlobalAlign(uint64_t TypeSize)`? Or maybe should just be "bool useMicrosoftGlobalAlign()" and keep the main logic here, if the rule is the same for multiple Windows targets. Needs a testcase in test/CodeGenCXX/ demonstrating the alignment of the emitted global in various cases. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61225/new/ https://reviews.llvm.org/D61225 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits