Skip to content

Commit 4259325

Browse files
authored
Merge pull request #61738 from mhjacobson/freebsd-swift-dependency-tool-avoid-redefinition
swift-dependency-tool: avoid redefinition of ScalarTraits<unsigned> on FreeBSD
2 parents 411b3d2 + 52ae8a3 commit 4259325

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tools/swift-dependency-tool/swift-dependency-tool.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ using namespace fine_grained_dependencies;
2828
// MARK: SourceFileDepGraph YAML reading & writing
2929
//==============================================================================
3030

31-
// This introduces a redefinition where ever std::is_same_t<size_t, uint64_t>
32-
// holds
33-
#if !(defined(__linux__) || defined(_WIN64))
31+
// This introduces a redefinition wherever std::is_same_t<size_t, uint64_t>
32+
// holds.
33+
#if !(defined(__linux__) || defined(_WIN64) || defined(__FreeBSD__))
3434
LLVM_YAML_DECLARE_SCALAR_TRAITS(size_t, QuotingType::None)
3535
#endif
3636
LLVM_YAML_DECLARE_ENUM_TRAITS(swift::fine_grained_dependencies::NodeKind)
@@ -88,8 +88,9 @@ LLVM_YAML_DECLARE_MAPPING_TRAITS(
8888

8989
namespace llvm {
9090
namespace yaml {
91-
// This introduces a redefinition for Linux.
92-
#if !(defined(__linux__) || defined(_WIN64))
91+
// This introduces a redefinition wherever std::is_same_t<size_t, uint64_t>
92+
// holds.
93+
#if !(defined(__linux__) || defined(_WIN64) || defined(__FreeBSD__))
9394
void ScalarTraits<size_t>::output(const size_t &Val, void *, raw_ostream &out) {
9495
out << Val;
9596
}

0 commit comments

Comments
 (0)