Having dlkj, dwishart, and dinvwishart in one of the TMB namespaces would enable users to assign likelihoods to correlation or covariance matrices. I have implemented these here. Documentation and tests against independent R implementations are there, too.
Following UNSTRUCTURED_CORR_t, users would pass a vector theta or c(log_sd, theta) instead of the full correlation or covariance matrix. This simplifies computation quite a bit.
Anyway, you are welcome to use or modify the code. At your discretion, I could also work on a pull request.