[llvm-dev] Find uses of Metadata / DITypes

Adrian Prantl via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 25 10:10:25 PDT 2020


It might help if you could explain what you are *actually* trying to do, since there are often other solutions for the higher-level problem that fit better into the design and architecture.

-- adrian

> On Mar 25, 2020, at 4:01 AM, Henrik Olsson via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> I'm looking for a way to efficiently traverse the Metadata structure in reverse, or otherwise find DITypes that refer to another DIType. As an example, say I have a DICompositeType describing a struct. Now I want to find other DITypes containing this type, e.g. a DIDerivedType describing its pointer type, or another struct containing this struct as one of its fields. Is this possible in LLVM today? Would it be unreasonable to save Metadata to Metadata uses, like what is done for Value to Value uses?
> 
> Any help would be greatly appreciated,
> Henrik
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list