Appearance
| 1 | namespace IR.LLVMTarget is | |
| 2 | use Semantic.Types.Type | |
| 3 | ||
| 4 | /// An LLVM value already lowered, standing in the IR where a value of | |
| 5 | /// `type` is expected, so the lowering can hand it to IR it builds. | |
| 6 | class LLVM_VALUE: IR.Values.Value is | |
| 7 | /// The lowered value. | |
| 8 | value: LLVM.Value | |
| 9 | ||
| 10 | _type: Type | |
| 11 | ||
| 12 | type: Type? pure => _type | |
| 13 | ||
| 14 | /// - value: the lowered value | |
| 15 | /// - type: the type of the value it holds | |
| 16 | init(value: LLVM.Value, type: Type) is | |
| 17 | super.init() | |
| 18 | ||
| 19 | self.value = value | |
| 20 | _type = type | |
| 21 | si | |
| 22 | ||
| 23 | to_string() -> string => "llvm-value:[{_type}]" | |
| 24 | si | |
| 25 | si |