Make an SIValue that shares the original's allocations but can safely expect those allocations * to remain in scope. This is most frequently the case for GraphEntity properties. */
| 179 | /* Make an SIValue that shares the original's allocations but can safely expect those allocations |
| 180 | * to remain in scope. This is most frequently the case for GraphEntity properties. */ |
| 181 | SIValue SI_ConstValue(const SIValue *v) { |
| 182 | SIValue dup = *v; |
| 183 | if(v->allocation != M_NONE) dup.allocation = M_CONST; |
| 184 | return dup; |
| 185 | } |
| 186 | |
| 187 | // Clone 'v' and set v's allocation to volatile if 'v' owned the memory |
| 188 | SIValue SI_TransferOwnership(SIValue *v) { |