Skip to content

Commit 47e0079

Browse files
authored
Merge pull request #6845 from jmgc/master
Correction for 32 bits platforms
2 parents 71cf245 + 2615a36 commit 47e0079

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/ClangImporter/SwiftLookupTable.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "llvm/ADT/Optional.h"
2828
#include "llvm/ADT/SmallVector.h"
2929
#include "llvm/ADT/TinyPtrVector.h"
30+
#include "llvm/Support/Compiler.h"
3031
#include <functional>
3132
#include <utility>
3233

@@ -133,8 +134,14 @@ class EffectiveClangContext {
133134
return StringRef(Unresolved.Data, UnresolvedLength);
134135
}
135136
};
137+
138+
#if LLVM_PTR_SIZE == 4
139+
static_assert(sizeof(EffectiveClangContext) <= 4 * sizeof(void *),
140+
"should fit in four pointers");
141+
#else
136142
static_assert(sizeof(EffectiveClangContext) <= 2 * sizeof(void *),
137143
"should fit in a couple pointers");
144+
#endif
138145

139146
class SwiftLookupTableReader;
140147
class SwiftLookupTableWriter;

0 commit comments

Comments
 (0)