macosx triple

I’m implementing a front-end compiler, and I don’t understand how Clang supports OS X.

using llvm::sys::getDefaultTargetTriple() I get a triple for the underlying Darwin OS.

Is there another function besides that to get the target triple for the hosting system, having a macosx triple for the macintosh systems?