mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: fix codegeneration for AsmOptions
This commit is contained in:
@@ -414,7 +414,7 @@ AsmClobberAbi = 'clobber_abi' '(' ('@string' (',' '@string')* ','?) ')'
|
||||
// option := "pure" / "nomem" / "readonly" / "preserves_flags" / "noreturn" / "nostack" / "att_syntax" / "raw"
|
||||
AsmOption = 'pure' | 'nomem' | 'readonly' | 'preserves_flags' | 'noreturn' | 'nostack' | 'att_syntax' | 'raw' | 'may_unwind'
|
||||
// options := "options(" option *("," option) [","] ")"
|
||||
AsmOptions = 'options' '(' AsmOption *(',' AsmOption) ','? ')'
|
||||
AsmOptions = 'options' '(' (AsmOption (',' AsmOption)* ','?) ')'
|
||||
AsmLabel = 'label' BlockExpr
|
||||
AsmSym = 'sym' Path
|
||||
AsmConst = 'const' Expr
|
||||
|
||||
@@ -21,6 +21,7 @@ fn class_name(type_name: &str) -> String {
|
||||
"Fn" => "Function".to_owned(),
|
||||
"Literal" => "LiteralExpr".to_owned(),
|
||||
"ArrayExpr" => "ArrayExprInternal".to_owned(),
|
||||
"AsmOptions" => "AsmOptionsList".to_owned(),
|
||||
_ if type_name.ends_with("Type") => format!("{}Repr", type_name),
|
||||
_ => type_name.to_owned(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user