[llvm-dev] Error in Object File Generation from Legacy Pass Manager

Jagrat Patkar via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 13 22:31:51 PST 2021


Hello,

I am trying out the Object File Generation Tutorial in Kaleidoscope, for
the IR I have generated through CodeGenerator. The compilation is
successful and the Obj file of the Compiler project is successfully built,
but when I execute the Obj file of my project it is giving me a
segmentation fault, I debugged my code for possible errors and found that
when I comment out the line

pass.run(*module);

to the LegacyPassManager it doesn't give me a segmentation fault error. I
could not figure what the issue is with this call? I have created Passes
for generating Obj file for generated IR using the call to TargetMachine

TargetMachine->addPassesToEmitFile(pass,dest,nullptr,FileType);

Regards
Jagrat Patkar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210214/641d9249/attachment.html>


More information about the llvm-dev mailing list