File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
main/java/au/com/integradev/delphi/compiler
test/java/au/com/integradev/delphi/compiler Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Added
11+
12+ - Support for the ` WEAK_NATIVEINT ` symbol, which is defined from Delphi 12 onward.
13+
1014### Fixed
1115
1216- Exceptions from empty structures (e.g., ` if ` ) in ` LoopExecutingAtMostOnce ` and ` RedundantJump ` .
Original file line number Diff line number Diff line change @@ -226,6 +226,10 @@ private Set<String> getAvailabilityConditionalDefines() {
226226 result .add ("WEAKINTFREF" );
227227 }
228228
229+ if (compilerVersion .compareTo (VERSION_ATHENS ) >= 0 ) {
230+ result .add ("WEAK_NATIVEINT" );
231+ }
232+
229233 if (checkToolchain (Toolchain .DCCIOSSIMARM64 )) {
230234 result .add ("IOSSIMULATOR" );
231235 }
Original file line number Diff line number Diff line change @@ -406,4 +406,11 @@ void testToolchainsBeforeDelphiAthensShouldNotDefineLLVM(Toolchain toolchain) {
406406 assertThat (PredefinedConditionals .getConditionalDefines (toolchain , VERSION_ALEXANDRIA ))
407407 .doesNotContain ("LLVM" );
408408 }
409+
410+ @ ParameterizedTest
411+ @ EnumSource (value = Toolchain .class )
412+ void testAllToolchainsAfterDelphiAlexandriaShouldDefineWeakNativeInt (Toolchain toolchain ) {
413+ assertThat (PredefinedConditionals .getConditionalDefines (toolchain , VERSION_ATHENS ))
414+ .contains ("WEAK_NATIVEINT" );
415+ }
409416}
You can’t perform that action at this time.
0 commit comments