Skip to content

Commit

Permalink
Reactor: Add address-of operator on reference types.
Browse files Browse the repository at this point in the history
Allows expressions like:

Array<Float4> arr;
Pointer<Float4> ptr = &arr[0];

Bug: b/126330097
Change-Id: I4ad95b46cfa1332eded0424ba4aeb7fe8642b71a
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/25709
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
  • Loading branch information
ben-clayton committed Mar 7, 2019
1 parent 45faa08 commit ec25573
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Reactor/Reactor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ namespace rr

RValue<T> operator+=(RValue<T> rhs) const;

RValue<Pointer<T>> operator&() const { return RValue<Pointer<T>>(address); }

Value *loadValue() const;
int getAlignment() const;

Expand Down

0 comments on commit ec25573

Please sign in to comment.