Skip to content

Commit

Permalink
[clang][modules] Over-align the Module class
Browse files Browse the repository at this point in the history
This makes `llvm::PointerIntPair<Module *, 3>` from f35230a work across platforms.

Reviewed By: srj

Differential Revision: https://reviews.llvm.org/D134653
  • Loading branch information
jansvoboda11 committed Sep 26, 2022
1 parent 10a3563 commit 715bd12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clang/include/clang/Basic/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ struct ASTFileSignature : std::array<uint8_t, 20> {
};

/// Describes a module or submodule.
class Module {
///
/// Aligned to 8 bytes to allow for llvm::PointerIntPair<Module *, 3>.
class alignas(8) Module {
public:
/// The name of this module.
std::string Name;
Expand Down

0 comments on commit 715bd12

Please sign in to comment.