[LLVMdev] Find template types of std::map

Eli Friedman eli.friedman at gmail.com
Tue Oct 16 11:07:49 PDT 2012


On Tue, Oct 16, 2012 at 4:17 AM, Sebastian Dreßler <dressler at zib.de> 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.

-Eli




More information about the llvm-dev mailing list