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

[LLVM] ExecutionUnit/JITLink build error. #64418

Closed
carlo-bramini opened this issue Aug 4, 2023 · 8 comments · Fixed by llvm/llvm-project-release-prs#787
Closed

[LLVM] ExecutionUnit/JITLink build error. #64418

carlo-bramini opened this issue Aug 4, 2023 · 8 comments · Fixed by llvm/llvm-project-release-prs#787

Comments

@carlo-bramini
Copy link
Contributor

carlo-bramini commented Aug 4, 2023

While compiling llvm-project for making the packages, which seems to use more strict options, I got this error:

/home/carlo/packages/llvm/llvm-18.0.0git-1.x86_64/src/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp: In function ‘bool llvm::jitlink::aarch32::writeRegister(llvm::jitlink::aarch32::WritableThumbRelocation&, llvm::jitlink::aarch32::HalfWords)’:
/home/carlo/packages/llvm/llvm-18.0.0git-1.x86_64/src/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp:182:1: error: no return statement in function returning non-void [-Werror=return-type]
  182 | }
      | ^
ninja: build stopped: subcommand failed.

The cause of the error is evident, since writeRegister() is declared for returning a bool:

bool writeRegister(WritableThumbRelocation &R, HalfWords Reg) {

but at the end of the function, it does not return any value.
In my opinion, this may be a copy-paste error and replacing bool with void just solves the issue.
Both current head and branch-17.x are affected by this mistake.

@llvmbot
Copy link
Member

llvmbot commented Aug 4, 2023

@llvm/issue-subscribers-jitlink

lhames added a commit that referenced this issue Aug 4, 2023
@lhames
Copy link
Contributor

lhames commented Aug 4, 2023

@carlo-bramini Thanks for catching this. I've changed the return type to void in dce1793.

@weliveindetail -- does that fix look right to you?

@weliveindetail
Copy link
Member

As noted in the ticket above, we missed to backport this to the 17.x release branch. Is it still worth doing?

@weliveindetail
Copy link
Member

/cherry-pick dce1793

@llvmbot
Copy link
Member

llvmbot commented Nov 23, 2023

/cherry-pick dce1793

Error: Command failed due to missing milestone.

@weliveindetail
Copy link
Member

/cherry-pick dce1793

@llvmbot
Copy link
Member

llvmbot commented Nov 23, 2023

/branch llvm/llvm-project-release-prs/issue64418

llvmbot pushed a commit to llvm/llvm-project-release-prs that referenced this issue Nov 23, 2023
This function does not return a value.

llvm/llvm-project#64418
(cherry picked from commit dce1793)
@llvmbot
Copy link
Member

llvmbot commented Nov 23, 2023

/pull-request llvm/llvm-project-release-prs#787

@tru tru moved this from Needs Triage to Needs Review in LLVM Release Status Nov 27, 2023
tru pushed a commit to llvm/llvm-project-release-prs that referenced this issue Nov 27, 2023
This function does not return a value.

llvm/llvm-project#64418
(cherry picked from commit dce1793)
@tru tru moved this from Needs Review to Done in LLVM Release Status Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants