Skip to content

Commit

Permalink
Add reserved version identifier for Xtensa architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilsonator committed Aug 8, 2024
1 parent f7f320a commit 530ca35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dmd/cond.d
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ extern (C++) final class VersionCondition : DVCondition
case "Win32":
case "Win64":
case "Windows":
case "Xtensa":
case "X86":
case "X86_64":
return true;
Expand Down
2 changes: 2 additions & 0 deletions compiler/test/fail_compilation/reserved_version.d
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ version = LoongArch32;
version = LoongArch64;
version = LoongArch_HardFloat;
version = LoongArch_SoftFloat;
version = Xtensa;
version = LittleEndian;
version = BigEndian;
version = ELFv1;
Expand Down Expand Up @@ -327,6 +328,7 @@ debug = LoongArch32;
debug = LoongArch64;
debug = LoongArch_HardFloat;
debug = LoongArch_SoftFloat;
debug = Xtensa;
debug = LittleEndian;
debug = BigEndian;
debug = ELFv1;
Expand Down
3 changes: 3 additions & 0 deletions compiler/test/fail_compilation/reserved_version_switch.d
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
// REQUIRED_ARGS: -version=LoongArch64
// REQUIRED_ARGS: -version=LoongArch_HardFloat
// REQUIRED_ARGS: -version=LoongArch_SoftFloat
// REQUIRED_ARGS: -version=Xtensa
// REQUIRED_ARGS: -version=LittleEndian
// REQUIRED_ARGS: -version=BigEndian
// REQUIRED_ARGS: -version=ELFv1
Expand Down Expand Up @@ -183,6 +184,7 @@
// REQUIRED_ARGS: -debug=LoongArch64
// REQUIRED_ARGS: -debug=LoongArch_HardFloat
// REQUIRED_ARGS: -debug=LoongArch_SoftFloat
// REQUIRED_ARGS: -debug=Xtensa
// REQUIRED_ARGS: -debug=LittleEndian
// REQUIRED_ARGS: -debug=BigEndian
// REQUIRED_ARGS: -debug=ELFv1
Expand Down Expand Up @@ -298,6 +300,7 @@ Error: version identifier `LoongArch32` is reserved and cannot be set
Error: version identifier `LoongArch64` is reserved and cannot be set
Error: version identifier `LoongArch_HardFloat` is reserved and cannot be set
Error: version identifier `LoongArch_SoftFloat` is reserved and cannot be set
Error: version identifier `Xtensa` is reserved and cannot be set
Error: version identifier `LittleEndian` is reserved and cannot be set
Error: version identifier `BigEndian` is reserved and cannot be set
Error: version identifier `ELFv1` is reserved and cannot be set
Expand Down

0 comments on commit 530ca35

Please sign in to comment.