summaryrefslogtreecommitdiff
path: root/src/formats/clang.rs
blob: 524b501f8b62db355126c93da5a747193f7ce7bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
pub fn format_clang(bytecode: &[u8]) -> Vec<u8> {
    let mut output = String::new();
    for chunk in bytecode.chunks(16) {
        for byte in chunk {
            output.push_str(&format!("0x{byte:02X}, "));
        }
        output.push('\n');
    }
    return output.into_bytes();
}