Skip to content

Commit

Permalink
revert info::enums::{OP_ACCESS_1, OP_ACCESS_2} to pub(super), bri…
Browse files Browse the repository at this point in the history
…ng the generator up to date with the changes in 40f17c3
  • Loading branch information
susitsm authored and Matyas Susits committed Sep 22, 2024
1 parent 0ff8ffd commit f0a0c81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected override void Generate((InstructionDef def, uint dword1, uint dword2)[
using (var writer = new FileWriter(TargetLanguage.Rust, FileUtils.OpenWrite(filename))) {
writer.WriteFileHeader();
writer.WriteLine(RustConstants.AttributeNoRustFmt);
writer.WriteLine($"pub(crate) static TABLE: [(u32, u32); {infos.Length}] = [");
writer.WriteLine($"pub(crate) const TABLE: [(u32, u32); {infos.Length}] = [");
using (writer.Indent()) {
foreach (var info in infos)
writer.WriteLine($"({NumberFormatter.FormatHexUInt32WithSep(info.dword1)}, {NumberFormatter.FormatHexUInt32WithSep(info.dword2)}),// {info.def.Code.Name(idConverter)}");
Expand Down Expand Up @@ -119,7 +119,7 @@ void GenerateOpAccesses(FileWriter writer) {
var opInfo = opInfos[index];
writer.WriteLine(RustConstants.AttributeNoRustFmt);
var name = idConverter.Constant($"OpAccess_{index}");
writer.WriteLine($"pub(super) static {name}: [{opAccessTypeStr}; {opInfo.Values.Length}] = [");
writer.WriteLine($"pub(super) const {name}: [{opAccessTypeStr}; {opInfo.Values.Length}] = [");
using (writer.Indent()) {
foreach (var value in opInfo.Values) {
var v = ToOpAccess(value);
Expand Down
4 changes: 2 additions & 2 deletions src/rust/iced-x86/src/info/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use core::fmt;
// GENERATOR-BEGIN: OpAccesses
// ⚠️This was generated by GENERATOR!🦹‍♂️
#[rustfmt::skip]
pub(crate) const OP_ACCESS_1: [OpAccess; 7] = [
pub(super) const OP_ACCESS_1: [OpAccess; 7] = [
OpAccess::None,
OpAccess::CondRead,
OpAccess::NoMemAccess,
Expand All @@ -17,7 +17,7 @@ pub(crate) const OP_ACCESS_1: [OpAccess; 7] = [
OpAccess::Write,
];
#[rustfmt::skip]
pub(crate) const OP_ACCESS_2: [OpAccess; 3] = [
pub(super) const OP_ACCESS_2: [OpAccess; 3] = [
OpAccess::None,
OpAccess::Read,
OpAccess::ReadWrite,
Expand Down

0 comments on commit f0a0c81

Please sign in to comment.