Skip to content

Commit 7969ae3

Browse files
committed
const vector passed to codegen
1 parent cc0ca37 commit 7969ae3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/common.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
160160
self.context.new_struct_constructor(None, struct_type.as_type(), None, values)
161161
}
162162

163+
fn const_vector(&self, values: &[RValue<'gcc>]) -> RValue<'gcc> {
164+
let typ = self.type_vector(values[0].get_type(), values.len() as u64);
165+
self.context.new_rvalue_from_vector(None, typ, values)
166+
}
167+
163168
fn const_to_opt_uint(&self, _v: RValue<'gcc>) -> Option<u64> {
164169
// TODO(antoyo)
165170
None

0 commit comments

Comments
 (0)