Skip to content

Commit 0269a02

Browse files
Fix typo and emit message for unexpected literal types.
1 parent 1e2ddfa commit 0269a02

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clang/utils/aarch64_builtins_test_generator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ def make_arg_for_type(ty: str) -> Tuple[str, str]:
150150
if ty in LITERAL_TYPES_MAP:
151151
return "", LITERAL_TYPES_MAP[ty]
152152

153+
if ty.startswith("ImmCheck") or ty.startswith("enum "):
154+
print(f"Failed to parse potential literal type: {ty}", file=sys.stderr)
155+
153156
name = ty.replace(" ", "_").replace("*", "ptr") + "_val"
154157
return f"{ty} {name};", name
155158

@@ -252,7 +255,7 @@ def emit_streaming_guard_run_lines(ctx: BuiltinContext) -> str:
252255

253256
if "streaming-only" in ctx.flags:
254257
assert not guard_features
255-
# Generate RUN lines for features only availble to streaming functions
258+
# Generate RUN lines for features only available to streaming functions
256259
for feats in streaming_guard_features:
257260
out.append(
258261
f"{run_prefix} {cc1_args_for_features(feats)} -verify=streaming-guard"
@@ -270,7 +273,7 @@ def emit_streaming_guard_run_lines(ctx: BuiltinContext) -> str:
270273
ctx.guard + "," + ctx.streaming_guard, ctx.flags
271274
)
272275

273-
# Generate RUN lines for features only availble to normal functions
276+
# Generate RUN lines for features only available to normal functions
274277
for feats in guard_features:
275278
if feats not in combined_features:
276279
out.append(f"{run_prefix} {cc1_args_for_features(feats)} -verify=guard")

0 commit comments

Comments
 (0)