Skip to content

Commit a59c60e

Browse files
committed
[Xtensa] Add esp32, esp8266 and esp32-s2 to valid cpu names.
1 parent d95b447 commit a59c60e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/lib/Basic/Targets/Xtensa.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ class LLVM_LIBRARY_VISIBILITY XtensaTargetInfo : public TargetInfo {
9393
}
9494

9595
bool isValidCPUName(StringRef Name) const override {
96-
return llvm::StringSwitch<bool>(Name).Case("generic", true).Default(false);
96+
return llvm::StringSwitch<bool>(Name)
97+
.Case("esp32", true)
98+
.Case("esp8266", true)
99+
.Case("esp32-s2", true)
100+
.Case("generic", true)
101+
.Default(false);
97102
}
98103

99104
bool setCPU(const std::string &Name) override {

0 commit comments

Comments
 (0)