Skip to content

Commit 8dddca3

Browse files
committed
Drop the target_os check
1 parent 544d922 commit 8dddca3

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

cpp2rust/converter/translation_rule.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,6 @@ TypeRule ParseTypeRuleJSON(const llvm::json::Object &obj) {
134134
return rule;
135135
}
136136

137-
bool TargetOSMatchesHost(llvm::StringRef target_os) {
138-
#if defined(__linux__)
139-
return target_os == "linux";
140-
#elif defined(__APPLE__)
141-
return target_os == "macos";
142-
#else
143-
return false;
144-
#endif
145-
}
146-
147137
void LoadTgtFromIR(ExprRules &exprs, TypeRules &types,
148138
const std::filesystem::path &json_path) {
149139
auto buf = llvm::MemoryBuffer::getFile(json_path.string());
@@ -167,11 +157,6 @@ void LoadTgtFromIR(ExprRules &exprs, TypeRules &types,
167157
if (!obj)
168158
continue;
169159

170-
if (auto target_os = obj->getString("target_os");
171-
target_os && !TargetOSMatchesHost(*target_os)) {
172-
continue;
173-
}
174-
175160
auto name = entry_name.str();
176161
if (name[0] == 'f') {
177162
exprs[std::move(name)] = ParseExprRuleJSON(*obj);

0 commit comments

Comments
 (0)