[LLVMdev] C++ Constructors
Chris Lattner
clattner at apple.com
Fri Dec 12 08:11:43 PST 2008
On Dec 12, 2008, at 7:39 AM, John Criswell wrote:
> Chris Lattner wrote:
>> [snip]
>>
>> Yes, that will cause it to run before anything else in the module.
>> If
>> you link to native code with a static ctor, the static ctors in that
>> code may run first.
>>
> Thanks Chris and Anton!
>
> Another question: the llvm.global.ctor array is an array of structures
> with an integer and a function pointer. What information does the
> integer convey?
In theory, it is an init priority. GCC supports an attribute to set
this. In practice, I don't think any llvm targets support it right now.
-Chris
More information about the llvm-dev
mailing list