File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -372,16 +372,17 @@ class Sema final {
372
372
QualType ResultTy,
373
373
ArrayRef<QualType> Args);
374
374
375
+ public:
375
376
/// The maximum alignment, same as in llvm::Value. We duplicate them here
376
377
/// because that allows us not to duplicate the constants in clang code,
377
378
/// which we must to since we can't directly use the llvm constants.
379
+ /// The value is verified against llvm here: lib/CodeGen/CGValue.h
378
380
///
379
381
/// This is the greatest alignment value supported by load, store, and alloca
380
382
/// instructions, and global values.
381
383
static const unsigned MaxAlignmentExponent = 29;
382
384
static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent;
383
385
384
- public:
385
386
typedef OpaquePtr<DeclGroupRef> DeclGroupPtrTy;
386
387
typedef OpaquePtr<TemplateName> TemplateTy;
387
388
typedef OpaquePtr<QualType> TypeTy;
Original file line number Diff line number Diff line change 15
15
#define LLVM_CLANG_LIB_CODEGEN_CGVALUE_H
16
16
17
17
#include " clang/AST/ASTContext.h"
18
+ #include " clang/Sema/Sema.h"
18
19
#include " clang/AST/Type.h"
19
20
#include " llvm/IR/Value.h"
20
21
#include " llvm/IR/Type.h"
21
22
#include " Address.h"
22
23
#include " CodeGenTBAA.h"
23
24
25
+ static_assert (clang::Sema::MaximumAlignment <= llvm::Value::MaximumAlignment,
26
+ " Clang max alignment greater than what LLVM supports?" );
27
+
24
28
namespace llvm {
25
29
class Constant ;
26
30
class MDNode ;
You can’t perform that action at this time.
0 commit comments