21 #include "llvm/Config/config.h"
24 #include <sys/utsname.h>
28 static std::string getOSVersion() {
38 std::string TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
42 std::string::size_type DarwinDashIdx = TargetTripleString.find(
"-darwin");
43 if (DarwinDashIdx != std::string::npos) {
44 TargetTripleString.resize(DarwinDashIdx + strlen(
"-darwin"));
45 TargetTripleString += getOSVersion();
std::string getDefaultTargetTriple()
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produ...
std::string normalize() const
Return the normalized form of this triple's string.