diff options
author | Peter Hawkins <phawkins@google.com> | 2017-09-28 08:31:53 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-28 08:36:32 -0700 |
commit | 8a154ead1e7089873746a8b282c5f4be22b65626 (patch) | |
tree | 177d5d88a7471e1a7b325e25695cbbad95a09d0e /tensorflow/compiler/xla/service/hlo_matchers.h | |
parent | 6bb544666f43a92bffd6352331ad35e025135d82 (diff) |
[XLA] Move definition of xla::PrintTo out of line to fix duplicate definition error in Mac build.
Fixes GitHub issue #13357
PiperOrigin-RevId: 170347379
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_matchers.h')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_matchers.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_matchers.h b/tensorflow/compiler/xla/service/hlo_matchers.h index 79f17bbb6b..b1b3dd61a6 100644 --- a/tensorflow/compiler/xla/service/hlo_matchers.h +++ b/tensorflow/compiler/xla/service/hlo_matchers.h @@ -130,13 +130,8 @@ std::vector<const HloInstruction*> Pointers(const Container& container) { // Tell GMock to print HloInstruction* by value, so error messages are nice. // Has to be in the same namespace as 'HloInstruction'. -void PrintTo(const HloInstruction* inst, ::std::ostream* os) { - *os << (inst ? inst->ToString() : "nullptr"); -} - -void PrintTo(HloInstruction* inst, ::std::ostream* os) { - PrintTo(const_cast<const HloInstruction*>(inst), os); -} +void PrintTo(const HloInstruction* inst, ::std::ostream* os); +void PrintTo(HloInstruction* inst, ::std::ostream* os); } // namespace xla |