Skip to content

Commit 2be6821

Browse files
authored
Merge pull request #79053 from kubamracek/embedded-riscv32
[embedded] Explicitly recognize riscv32 as a valid arch conditional
2 parents adc16be + d36b5e5 commit 2be6821

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Basic/LangOptions.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static const SupportedConditionalValue SupportedConditionalCompilationArches[] =
100100
"powerpc64le",
101101
"s390x",
102102
"wasm32",
103+
"riscv32",
103104
"riscv64",
104105
"avr"
105106
};
@@ -540,6 +541,9 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
540541
case llvm::Triple::ArchType::wasm32:
541542
addPlatformConditionValue(PlatformConditionKind::Arch, "wasm32");
542543
break;
544+
case llvm::Triple::ArchType::riscv32:
545+
addPlatformConditionValue(PlatformConditionKind::Arch, "riscv32");
546+
break;
543547
case llvm::Triple::ArchType::riscv64:
544548
addPlatformConditionValue(PlatformConditionKind::Arch, "riscv64");
545549
break;

0 commit comments

Comments
 (0)