Revision ac4b68fbf45853ba4b9e327cb42f93f42a8fa252 authored by Ellie Shin on 17 March 2023, 04:14:20 UTC, committed by Ellie Shin on 17 March 2023, 04:14:20 UTC
1 parent f2c68fb
ctypes_parse_bitfields.swift
// RUN: %target-typecheck-verify-swift %clang-importer-sdk
import ctypes
func useStructWithBitfields(_ mrm: ModRM) -> ModRM {
let rm: CUnsignedInt = mrm.rm
let reg: CUnsignedInt = mrm.reg
let mod: CUnsignedInt = mrm.mod
let opcode: CUnsignedInt = mrm.opcode
var new: ModRM = ModRM()
new.rm = rm
new.reg = reg
new.mod = mod
new.opcode = opcode
return mrm
}
func constructStructWithBitfields(_ x: CUnsignedInt) {
_ = StructWithBitfields()
_ = StructWithBitfields(First: x, Second: x, Third: x)
}
Computing file changes ...