API function to get file dependencies of compilation

Hi all,

Is there a relatively easy way to get the dependencies (files) for a call to clang from its internals.

I know I can probably rewrite the rags and add -MD, then parse and remove the temporary output but I figure there might be an internal function which would be much easier.

Billy Moses