[LLVMdev] Global data order

Vladimir Prus ghost at cs.msu.su
Tue Jul 13 04:37:37 PDT 2004


Hello,
given

    %TestArrayPtr = global %struct.test* getelementptr (
           [10 x %struct.test]* %TestArray, ..........
    %TestArray = weak global [10 x %struct.test] zeroinitialize

my backend produce data declaration in the same order, so TestArrayPtr refers 
to TestArray before TestArray itself is defined. 

Is there a standard way to get the right ordering. I wrote my own code, but 
maybe there's something better.

- Volodya




More information about the llvm-dev mailing list