[LLVMdev] Find template types of std::map
Sebastian Dreßler
dressler at zib.de
Wed Oct 17 07:45:22 PDT 2012
Eli Friedman-2 wrote
> On Tue, Oct 16, 2012 at 4:17 AM, Sebastian Dreßler <
> dressler@
> > wrote:
>> Hi,
>>
>> for a current project I'm required to get the types of the template
>> arguments key and value for std::map<K,V>. I've noticed that the
>> STL
>> implementation used by Clang defines the type of the map as
>>
>> %"class.std::map" = type { %"class.std::_Rb_tree" }
>
> Trying to dig template arguments out of LLVM IR types is a bad idea.
> Try a C++ demangler on a related function name, or the debug
> information.
Thanks for the hint, I'll try that. However, when I successfully determined
the name of the template parameters, I'll have to find the LLVM IR std::pair
definition nevertheless. So, is there any function providing all names of
named structs from a module? When I dump the module, I'm able to see all
those structs, but I didn't find a function for e.g. iterating them.
Best,
Sebastian
--
View this message in context: http://llvm.1065342.n5.nabble.com/Find-template-types-of-std-map-tp49951p50003.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the llvm-dev
mailing list