Villmow, Micah
2008-Sep-10 19:18 UTC
[LLVMdev] Determining the names of all the functions in a module
I am attemping to figure out how to access the function names that are stored in a module so that I know which function I am currently in. I am attempting to write a backend that targets a language that only allows integer function names and I need to create mapping between the string and the integer. I've looked in the header files but I cannot determine how to extract the function name from either a Function object or a Module. Any tips or ideas would be greatly appreciated. Thanks, Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080910/a356143b/attachment.html>
Julio
2008-Sep-10 19:39 UTC
[LLVMdev] Determining the names of all the functions in a module
Hello, since I know, you can use getFunctionList or a function iterator (begin & end) on the Module, and then use getName on the Function object (you can get the name from any object that inherits from Value). Bye. 2008/9/10 Villmow, Micah <Micah.Villmow at amd.com>> I am attemping to figure out how to access the function names that are > stored in a > > module so that I know which function I am currently in. I am attempting to > write a > > backend that targets a language that only allows integer function names and > I need > > to create mapping between the string and the integer. I've looked in the > header files > > but I cannot determine how to extract the function name from either a > Function object > > or a Module. > > > > Any tips or ideas would be greatly appreciated. > > > > Thanks, > > > > Micah Villmow > > Systems Engineer > > Advanced Technology & Performance > > Advanced Micro Devices Inc. > > 4555 Great America Pkwy, > > Santa Clara, CA. 95054 > > P: 408-572-6219 > > F: 408-572-6596 > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080910/7d7e5e91/attachment.html>
Evan Cheng
2008-Sep-11 05:31 UTC
[LLVMdev] Determining the names of all the functions in a module
A Function is a Value. See Value.h, look for getName(), etc. Evan On Sep 10, 2008, at 12:18 PM, Villmow, Micah wrote:> I am attemping to figure out how to access the function names that > are stored in a > module so that I know which function I am currently in. I am > attempting to write a > backend that targets a language that only allows integer function > names and I need > to create mapping between the string and the integer. I’ve looked in > the header files > but I cannot determine how to extract the function name from either > a Function object > or a Module. > > Any tips or ideas would be greatly appreciated. > > Thanks, > > Micah Villmow > Systems Engineer > Advanced Technology & Performance > Advanced Micro Devices Inc. > 4555 Great America Pkwy, > Santa Clara, CA. 95054 > P: 408-572-6219 > F: 408-572-6596 > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080910/aed896ef/attachment.html>
Villmow, Micah
2008-Sep-11 15:52 UTC
[LLVMdev] Determining the names of all the functions in a module
Are there any known inheritance graphs of all the classes? That definitely would help in trying to understand the interactions between everything. Micah ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Evan Cheng Sent: Wednesday, September 10, 2008 10:32 PM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Determining the names of all the functions in a module A Function is a Value. See Value.h, look for getName(), etc. Evan On Sep 10, 2008, at 12:18 PM, Villmow, Micah wrote: I am attemping to figure out how to access the function names that are stored in a module so that I know which function I am currently in. I am attempting to write a backend that targets a language that only allows integer function names and I need to create mapping between the string and the integer. I've looked in the header files but I cannot determine how to extract the function name from either a Function object or a Module. Any tips or ideas would be greatly appreciated. Thanks, Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080911/67c28ba3/attachment.html>
Seemingly Similar Threads
- [LLVMdev] Determining the names of all the functions in a module
- [LLVMdev] Determining the names of all the functions in a module
- [LLVMdev] Determining the register type of a MachineOperand
- [LLVMdev] Determining the register type of a MachineOperand
- [LLVMdev] Determining the register type of a MachineOperand