Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_llc_test_checks.py crashes when trying to add checks to a newly created test file #91901

Open
Poseydon42 opened this issue May 12, 2024 · 0 comments
Labels
llvm-tools All llvm tools that do not have corresponding tag

Comments

@Poseydon42
Copy link
Contributor

The update_llc_test_checks.py script crashes when generating check lines for the first time if the file does not have a ; RUN ... line at the top. The error message is below:

Traceback (most recent call last):
  File "/home/poseydon/dev/llvm-project/./llvm/utils/update_llc_test_checks.py", line 285, in <module>
    main()
  File "/home/poseydon/dev/llvm-project/./llvm/utils/update_llc_test_checks.py", line 240, in main
    output_type.add_checks(
UnboundLocalError: local variable 'output_type' referenced before assignment

Steps to reproduce:

  1. Create a new .ll file in llvm/test/CodeGen/X86/
  2. Add at least one function to it
  3. Run update_llc_test_checks.py --llc-binary path/to/your/built/llc llvm/test/CodeGen/X86/your_file.ll

Can someone please confirm if this is indeed a bug or if the scripts isn't intended to be used without manually adding a ; RUN ... line first.

@EugeneZelenko EugeneZelenko added llvm-tools All llvm tools that do not have corresponding tag and removed new issue labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm-tools All llvm tools that do not have corresponding tag
Projects
None yet
Development

No branches or pull requests

3 participants
@EugeneZelenko @Poseydon42 and others