Skip to content

Commit

Permalink
[DAPHNE-daphne-eu#830] Fix duplicate symbol linker issue
Browse files Browse the repository at this point in the history
Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp.
  • Loading branch information
corepointer committed Sep 24, 2024
1 parent a44bc98 commit 6bb56fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/runtime/local/kernels/BinaryOpCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static constexpr bool supportsBinaryOp = false;
// simplicity).
#define SUPPORT(Op, VT) \
template <> \
constexpr bool supportsBinaryOp<BinaryOpCode::Op, VT, VT, VT> = true;
static constexpr bool supportsBinaryOp<BinaryOpCode::Op, VT, VT, VT> = true;

// Generates code specifying that all binary operations of a certain category
// should be supported on the given value type `VT` (for the result and the two
Expand Down Expand Up @@ -154,10 +154,10 @@ SUPPORT_NUMERIC_INT(uint64_t)
SUPPORT_NUMERIC_INT(uint32_t)
SUPPORT_NUMERIC_INT(uint8_t)
template <>
constexpr bool supportsBinaryOp<BinaryOpCode::CONCAT, const char *,
static constexpr bool supportsBinaryOp<BinaryOpCode::CONCAT, const char *,
const char *, const char *> = true;
template <>
constexpr bool
static constexpr bool
supportsBinaryOp<BinaryOpCode::EQ, int64_t, const char *, const char *> =
true;

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/local/kernels/UnaryOpCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static constexpr bool supportsUnaryOp = false;
// on the value type `VT` (for both the result and the argument, for
// simplicity).
#define SUPPORT(Op, VT) \
template <> constexpr bool supportsUnaryOp<UnaryOpCode::Op, VT, VT> = true;
template <> static constexpr bool supportsUnaryOp<UnaryOpCode::Op, VT, VT> = true;

// Generates code specifying that all unary operations typically supported on
// numeric value types should be supported on the given value type `VT`
Expand Down

0 comments on commit 6bb56fe

Please sign in to comment.