Gaier, Bjoern via llvm-dev
2018-Dec-13 07:14 UTC
[llvm-dev] Setting a function in a module to extern
Hello again, as mentioned in a different mail, I'm a beginner with the LLVM and writing a JIT-Client under Windows. In my llvm::Module I have a certain function - now I want to delete this function, but keep all the calls and references to it. I kind of want to set the function to an external function. Is this possible? Kind greetings Björn Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181213/7631cd41/attachment.html>
I think you just need to llvm::Function::Create(Type, Linkage, Name, Module) it and not add any basic blocks to it. Boldizsár Palotás From: "Gaier, Bjoern via llvm-dev" <llvm-dev at lists.llvm.org> To: LLVM Developers Mailing List <llvm-dev at lists.llvm.org> Date: 2018.12.13 08:14 Subject: [llvm-dev] Setting a function in a module to extern Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org> Hello again, as mentioned in a different mail, I’m a beginner with the LLVM and writing a JIT-Client under Windows. In my llvm::Module I have a certain function – now I want to delete this function, but keep all the calls and references to it. I kind of want to set the function to an external function. Is this possible? Kind greetings Björn Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev This message is intended only for the recipient(s) named above. It may contain proprietary information and/or protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect personal data, in case of data privacy queries, please contact the ESA Data Protection Officer (dpo at esa.int). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181213/e6c5d528/attachment.html>
Gaier, Bjoern via llvm-dev
2018-Dec-13 13:30 UTC
[llvm-dev] Setting a function in a module to extern
But in my module this function already exist… I first want to delete it but without also deleting the calls to it… From: Boldizsar.Palotas at esa.int <Boldizsar.Palotas at esa.int> Sent: Donnerstag, 13. Dezember 2018 10:53 To: Gaier, Bjoern <Bjoern.Gaier at horiba.com> Cc: LLVM Developers Mailing List <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Setting a function in a module to extern I think you just need to llvm::Function::Create(Type, Linkage, Name, Module) it and not add any basic blocks to it. Boldizsár Palotás From: "Gaier, Bjoern via llvm-dev" <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> To: LLVM Developers Mailing List <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> Date: 2018.12.13 08:14 Subject: [llvm-dev] Setting a function in a module to extern Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces at lists.llvm.org>> ________________________________ Hello again, as mentioned in a different mail, I’m a beginner with the LLVM and writing a JIT-Client under Windows. In my llvm::Module I have a certain function – now I want to delete this function, but keep all the calls and references to it. I kind of want to set the function to an external function. Is this possible? Kind greetings Björn Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev This message is intended only for the recipient(s) named above. It may contain proprietary information and/or protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect personal data, in case of data privacy queries, please contact the ESA Data Protection Officer (dpo at esa.int<mailto:dpo at esa.int>). Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181213/fbcae44d/attachment-0001.html>