Precondition: !IsUninitialized(). It's very common to do foo.builder()->bar(). Without this precondition, if foo.builder() is null, the call to bar will segfault at some point possibly deep in the callstack when we finally dereference `this`. The precondition lets us avoid this tricky-to-debug problem.
| 67 | // deep in the callstack when we finally dereference `this`. The precondition |
| 68 | // lets us avoid this tricky-to-debug problem. |
| 69 | XlaBuilder* builder() const { |
| 70 | CHECK(builder_ != nullptr); |
| 71 | return builder_; |
| 72 | } |
| 73 | |
| 74 | // Returns true if the XlaOp represents valid, non-erroneous value. |
| 75 | bool valid() const { return handle_ >= 0; } |
no outgoing calls
no test coverage detected