This is an archive of the discontinued LLVM Phabricator instance.

Add a public accessor for GlobalCtors in CodeGenModule
ClosedPublic

Authored by loladiro on Dec 28 2014, 10:51 AM.

Details

Summary

I'm using clang in a JIT context where I found it useful to be able to
access the GlobalCtors and especially clear them once I have emitted
and called them. I'd like to add a public method to be able to access
the list. Thoughts?

Diff Detail

Repository
rL LLVM

Event Timeline

loladiro updated this revision to Diff 17659.Dec 28 2014, 10:51 AM
loladiro retitled this revision from to Add a public accessor for GlobalCtors in CodeGenModule.
loladiro updated this object.
loladiro edited the test plan for this revision. (Show Details)
loladiro set the repository for this revision to rL LLVM.
loladiro added a subscriber: Unknown Object (MLST).

That's for Julia, right?

I'm reminded of the discussion

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140825/113355.html

other than the "we should have a more complete ModuleBuilder API instead of going CodeGenModule" the patch LGTM.

Yes, this is for Julia, or more specifically, the julia C++ FFI at https://github.com/Keno/Cxx.jl. I'm not sure my project is far enough along yet to be able to say which of the codegen APIs I will end up needing, but once I get to that point I'll start a discussion on properly moving them to the public headers (if that discussion doesn't start before then).

Thanks for the LGTM, I'll go ahead and commit this then.

This revision was automatically updated to reflect the committed changes.