MIRIYALA JEEVAN KUMAR via llvm-dev
2020-Feb-04 09:54 UTC
[llvm-dev] Can I delete a function argument and its corresponding code from a file
I have a following sample function in a file which contains only function definitions like this. void mul(int x, int y, int& out, *int* arr*) { * arr[0] = 2;* * arr[1] = 1;* out = x * y; } I want to convert it to void mul(int x, int y, int& out) { out = x * y; } file contains only above function definitions. -- Thanks & Regards Jeevan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200204/011bd9ba/attachment.html>
Johannes Doerfert via llvm-dev
2020-Feb-04 15:08 UTC
[llvm-dev] Can I delete a function argument and its corresponding code from a file
Hi Jeevan, the function is externally visible, you cannot modify the signature. If it has internal or private linkage you can, assuming you adjust all the uses (call sites and other uses). Cheers, Johannes On 02/04, MIRIYALA JEEVAN KUMAR via llvm-dev wrote:> I have a following sample function in a file which contains only function > definitions like this. > > void mul(int x, int y, int& out, *int* arr*) { > * arr[0] = 2;* > * arr[1] = 1;* > out = x * y; > } > > I want to convert it to > void mul(int x, int y, int& out) { > out = x * y; > } > > file contains only above function definitions. > > -- > Thanks & Regards > Jeevan> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Johannes Doerfert Researcher Argonne National Laboratory Lemont, IL 60439, USA jdoerfert at anl.gov -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200204/db61d968/attachment.sig>
MIRIYALA JEEVAN KUMAR via llvm-dev
2020-Feb-05 06:29 UTC
[llvm-dev] Can I delete a function argument and its corresponding code from a file
Thank you for the clarification. On Tue, Feb 4, 2020 at 8:39 PM Johannes Doerfert <jdoerfert at anl.gov> wrote:> Hi Jeevan, > > the function is externally visible, you cannot modify the signature. > If it has internal or private linkage you can, assuming you adjust all > the uses (call sites and other uses). > > Cheers, > Johannes > > On 02/04, MIRIYALA JEEVAN KUMAR via llvm-dev wrote: > > I have a following sample function in a file which contains only function > > definitions like this. > > > > void mul(int x, int y, int& out, *int* arr*) { > > * arr[0] = 2;* > > * arr[1] = 1;* > > out = x * y; > > } > > > > I want to convert it to > > void mul(int x, int y, int& out) { > > out = x * y; > > } > > > > file contains only above function definitions. > > > > -- > > Thanks & Regards > > Jeevan > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > -- > > Johannes Doerfert > Researcher > > Argonne National Laboratory > Lemont, IL 60439, USA > > jdoerfert at anl.gov >-- Thanks & Regards Miriyala Jeevan Kumar ph no: 8985437363 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200205/5faa9bba/attachment.html>
Seemingly Similar Threads
- Question about a AA result and its use in Dependence Analysis
- Question about a AA result and its use in Dependence Analysis
- Question about a AA result and its use in Dependence Analysis
- [PATCH] D69853: [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h
- [NEW] LLVM / Clang Social in Chicago