clang and the haskell calling convention

Sorry if this question popped up before, looked in the lists and did not find anything about it.

I am experimenting with letting some C functions in my code use llvm's new "cc 10", but could not find out how to enrol clang to help me. Right now I am playing with:

   * giving them an __attribute__((fastcall))
   * emitting llvm code
   * substituting "cc 10" for "x86_fastcallcc" everywhere
   * ending the compilation

Seems to work fine for my first tiny tests, but it is a terrifyingly fragile way to do things. Do I have any better option?

Cheers, thx
Miguel

Maybe this is the wrong place for this question. My google-foo is weak, appreciate suggestions as to where to ask.

Cheers, thx for the wonderful work on llvm.