How to iterate over all the GlovalVariables at runtime

Hi all,
I’m playing with the interpreter and I’m able to access to some GlobalVariable, if for instance used by a GEP instruction. I was wondering if it is possible to list all of them independently from the instruction I’m currently visiting and obviously the relative value. For instance, in my .ll I have something:

@.str.4.49 = private unnamed_addr constant [19 x i8] c" but running with \00", align 1
@.str.2.50 = private unnamed_addr constant [7 x i8] c"1.6.15\00", align 1
@.str.5.55 = private unnamed_addr constant [42 x i8] c"Unknown freer parameter in png_data_freer\00", align 1

Is it possible to iterate over them and get the values?

Thanks
Alberto

Hi all,
I think I could just use llvm::Module::global_begin() . Is it correct?

I don’t know how I missed that :slight_smile:

Thanks