<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63702>63702</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM Build fails if exception enabled
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kmistryic
</td>
</tr>
</table>
<pre>
cmake options to reproduce.
`-DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_EXAMPLES=ON
`
```
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘uintptr_t readSLEB128(const uint8_t**)’:
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:374:22: warning: left shift of negative value [-Wshift-negative-value]
374 | result |= (~0 << shift);
| ^~~~~
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘llvm::BasicBlock* createFinallyBlock(llvm::LLVMContext&, llvm::Module&, llvm::IRBuilder<>&, llvm::Function&, std::string&, std::string&, llvm::BasicBlock&, llvm::BasicBlock&, llvm::Value**, llvm::Value**, llvm::Value**)’:
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1001:76: error: no matching function for call to ‘llvm::IRBuilder<>::CreateLoad(llvm::Value*&)’
1001 | *exceptionCaughtFlag),
| ^
In file included from /home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:56:
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const char*)’
1735 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const char *Name) {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const llvm::Twine&)’
1739 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, bool, const llvm::Twine&)’
1743 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, bool isVolatile,
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate expects 4 arguments, 1 provided
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘llvm::Function* createCatchWrappedInvokeFunction(llvm::Module&, llvm::IRBuilder<>&, llvm::legacy::FunctionPassManager&, llvm::Function&, std::string, unsigned int, unsigned int*)’:
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1189:57: error: no matching function for call to ‘llvm::IRBuilder<>::CreateLoad(llvm::Value*&)’
1189 | builder.CreateLoad(exceptionStorage));
| ^
In file included from /home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:56:
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const char*)’
1735 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const char *Name) {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const llvm::Twine&)’
1739 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, bool, const llvm::Twine&)’
1743 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, bool isVolatile,
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate expects 4 arguments, 1 provided
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1209:62: error: no matching function for call to ‘llvm::IRBuilder<>::CreateLoad(llvm::Value*&)’
1209 | builder.CreateResume(builder.CreateLoad(caughtResultStorage));
| ^
In file included from /home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:56:
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const char*)’
1735 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const char *Name) {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const llvm::Twine&)’
1739 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, bool, const llvm::Twine&)’
1743 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, bool isVolatile,
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate expects 4 arguments, 1 provided
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1249:13: error: no matching function for call to ‘llvm::IRBuilder<>::CreateLoad(llvm::Value*)’
1249 | 0));
| ^
In file included from /home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:56:
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const char*)’
1735 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const char *Name) {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const llvm::Twine&)’
1739 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, bool, const llvm::Twine&)’
1743 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, bool isVolatile,
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate expects 4 arguments, 1 provided
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1282:79: error: no matching function for call to ‘llvm::IRBuilder<>::CreateConstGEP1_64(llvm::Value*&, int64_t&)’
1282 | ourBaseFromUnwindOffset),
| ^
In file included from /home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:56:
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1872:10: note: candidate: ‘llvm::Value* llvm::IRBuilderBase::CreateConstGEP1_64(llvm::Type*, llvm::Value*, uint64_t, const llvm::Twine&)’
1872 | Value *CreateConstGEP1_64(Type *Ty, Value *Ptr, uint64_t Idx0,
| ^~~~~~~~~~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1872:10: note: candidate expects 4 arguments, 2 provided
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1298:63: error: no matching function for call to ‘llvm::IRBuilder<>::CreateLoad(llvm::Value*&)’
1298 | *(builder.CreateLoad(typeInfoThrownType)),
| ^
In file included from /home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:56:
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const char*)’
1735 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const char *Name) {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1735:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, const llvm::Twine&)’
1739 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") {
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1739:13: note: candidate expects 3 arguments, 1 provided
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Type*, llvm::Value*, bool, const llvm::Twine&)’
1743 | LoadInst *CreateLoad(Type *Ty, Value *Ptr, bool isVolatile,
| ^~~~~~~~~~
/home/kkumar/llvm-project/llvm/include/llvm/IR/IRBuilder.h:1743:13: note: candidate expects 4 arguments, 1 provided
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘void runExceptionThrow(llvm::ExecutionEngine*, llvm::Function*, int32_t)’:
/home/kkumar/llvm-project/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1563:29: warning: catching polymorphic type ‘class {anonymous}::OurCppRunException’ by value [-Wcatch-value=]
1563 | catch (OurCppRunException exc) {
| ^~~
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsW01P47wa_TXuxgKldvO16CL9urdSmUEML3N3lZs4rS-JHdkO0A2__ZWdhlIInTIzhQolqqCx6zyPfU5Ojq2YKMWWnNI-cAfAHXVIqVdC9m9zprRcs7izEMm6H-fklkJRaCa4glpASQspkjKm58AZAScCnnM2ms1uLubjb9FgNp6P_wvw6Ps3uFt6dX093Skf_DOdjebj_0UXl7Pxj6rq6YrbL9WnOkWTlcgpQJPb2zInEqBJlt3lZ4UU_6ex3pwCNKEPJC8yqgCajB9ianMf0Vy8PD-PiwLgCE45TEsem2IIxggEDgiDknFdaDnXUFKS_JiNB10UABTEgisNTW0w1wBF9hPWzUKAo-Nmi_0ewBFCJvF7IjnjS_M1o6mGasVSDUUKOV0Sze4ovCNZSSFwB2c_beVZXXNma4A7qrKFEPs9CPwhNIekqsy0OQV4BAEKHh0I8BDgYRXCdBgP6pbmqFu-OoA7fnx8fPwMBO21cARwNCCKxYNMxLcARTCWlGg6YZxk2XpT-uzHhp1DwTV90AB5AA3htu5CJGVGXxVPrwYl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