[LLVMdev] Linking modules across contexts crashes

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jun 4 14:29:20 PDT 2015


> 1. How to find all constants in Module? Does this code find all of them, or
> they are somewhere else too?
>   for (GlobalVariable &GV : globals()) {
>     if (auto C = static_cast<Constant*>(GV.Op<0>().get())) {
>       ... C is Constant*
>     }
>   }

Constants are unfortunately part of the Context, not the module :-(

Cheers,
Rafael



More information about the llvm-dev mailing list