本文整理汇总了C++中llvm::Triple::isPS4CPU方法的典型用法代码示例。如果您正苦于以下问题:C++ Triple::isPS4CPU方法的具体用法?C++ Triple::isPS4CPU怎么用?C++ Triple::isPS4CPU使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llvm::Triple
的用法示例。
在下文中一共展示了Triple::isPS4CPU方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalculateRTTIMode
static ToolChain::RTTIMode CalculateRTTIMode(const ArgList &Args,
const llvm::Triple &Triple,
const Arg *CachedRTTIArg) {
// Explicit rtti/no-rtti args
if (CachedRTTIArg) {
if (CachedRTTIArg->getOption().matches(options::OPT_frtti))
return ToolChain::RM_EnabledExplicitly;
else
return ToolChain::RM_DisabledExplicitly;
}
// -frtti is default, except for the PS4 CPU.
if (!Triple.isPS4CPU())
return ToolChain::RM_EnabledImplicitly;
// On the PS4, turning on c++ exceptions turns on rtti.
// We're assuming that, if we see -fexceptions, rtti gets turned on.
Arg *Exceptions = Args.getLastArgNoClaim(
options::OPT_fcxx_exceptions, options::OPT_fno_cxx_exceptions,
options::OPT_fexceptions, options::OPT_fno_exceptions);
if (Exceptions &&
(Exceptions->getOption().matches(options::OPT_fexceptions) ||
Exceptions->getOption().matches(options::OPT_fcxx_exceptions)))
return ToolChain::RM_EnabledImplicitly;
return ToolChain::RM_DisabledImplicitly;
}
示例2: CalculateRTTIMode
static ToolChain::RTTIMode CalculateRTTIMode(const ArgList &Args,
const llvm::Triple &Triple,
const Arg *CachedRTTIArg) {
// Explicit rtti/no-rtti args
if (CachedRTTIArg) {
if (CachedRTTIArg->getOption().matches(options::OPT_frtti))
return ToolChain::RM_Enabled;
else
return ToolChain::RM_Disabled;
}
// -frtti is default, except for the PS4 CPU.
return (Triple.isPS4CPU()) ? ToolChain::RM_Disabled : ToolChain::RM_Enabled;
}
示例3: AddDefaultCIncludePaths
//.........这里部分代码省略.........
}
switch (os) {
case llvm::Triple::Linux:
case llvm::Triple::Solaris:
llvm_unreachable("Include management is handled in the driver.");
case llvm::Triple::CloudABI: {
// <sysroot>/<triple>/include
SmallString<128> P = StringRef(HSOpts.ResourceDir);
llvm::sys::path::append(P, "../../..", triple.str(), "include");
AddPath(P, System, false);
break;
}
case llvm::Triple::Haiku:
AddPath("/boot/system/non-packaged/develop/headers", System, false);
AddPath("/boot/system/develop/headers/os", System, false);
AddPath("/boot/system/develop/headers/os/app", System, false);
AddPath("/boot/system/develop/headers/os/arch", System, false);
AddPath("/boot/system/develop/headers/os/device", System, false);
AddPath("/boot/system/develop/headers/os/drivers", System, false);
AddPath("/boot/system/develop/headers/os/game", System, false);
AddPath("/boot/system/develop/headers/os/interface", System, false);
AddPath("/boot/system/develop/headers/os/kernel", System, false);
AddPath("/boot/system/develop/headers/os/locale", System, false);
AddPath("/boot/system/develop/headers/os/mail", System, false);
AddPath("/boot/system/develop/headers/os/media", System, false);
AddPath("/boot/system/develop/headers/os/midi", System, false);
AddPath("/boot/system/develop/headers/os/midi2", System, false);
AddPath("/boot/system/develop/headers/os/net", System, false);
AddPath("/boot/system/develop/headers/os/opengl", System, false);
AddPath("/boot/system/develop/headers/os/storage", System, false);
AddPath("/boot/system/develop/headers/os/support", System, false);
AddPath("/boot/system/develop/headers/os/translation", System, false);
AddPath("/boot/system/develop/headers/os/add-ons/graphics", System, false);
AddPath("/boot/system/develop/headers/os/add-ons/input_server", System, false);
AddPath("/boot/system/develop/headers/os/add-ons/mail_daemon", System, false);
AddPath("/boot/system/develop/headers/os/add-ons/registrar", System, false);
AddPath("/boot/system/develop/headers/os/add-ons/screen_saver", System, false);
AddPath("/boot/system/develop/headers/os/add-ons/tracker", System, false);
AddPath("/boot/system/develop/headers/os/be_apps/Deskbar", System, false);
AddPath("/boot/system/develop/headers/os/be_apps/NetPositive", System, false);
AddPath("/boot/system/develop/headers/os/be_apps/Tracker", System, false);
AddPath("/boot/system/develop/headers/3rdparty", System, false);
AddPath("/boot/system/develop/headers/bsd", System, false);
AddPath("/boot/system/develop/headers/glibc", System, false);
AddPath("/boot/system/develop/headers/posix", System, false);
AddPath("/boot/system/develop/headers", System, false);
break;
case llvm::Triple::RTEMS:
break;
case llvm::Triple::Win32:
switch (triple.getEnvironment()) {
default: llvm_unreachable("Include management is handled in the driver.");
case llvm::Triple::Cygnus:
AddPath("/usr/include/w32api", System, false);
break;
case llvm::Triple::GNU:
break;
}
break;
default:
break;
}
switch (os) {
case llvm::Triple::CloudABI:
case llvm::Triple::RTEMS:
case llvm::Triple::NaCl:
case llvm::Triple::ELFIAMCU:
break;
case llvm::Triple::PS4: {
// <isysroot> gets prepended later in AddPath().
std::string BaseSDKPath = "";
if (!HasSysroot) {
const char *envValue = getenv("SCE_ORBIS_SDK_DIR");
if (envValue)
BaseSDKPath = envValue;
else {
// HSOpts.ResourceDir variable contains the location of Clang's
// resource files.
// Assuming that Clang is configured for PS4 without
// --with-clang-resource-dir option, the location of Clang's resource
// files is <SDK_DIR>/host_tools/lib/clang
SmallString<128> P = StringRef(HSOpts.ResourceDir);
llvm::sys::path::append(P, "../../..");
BaseSDKPath = P.str();
}
}
AddPath(BaseSDKPath + "/target/include", System, false);
if (triple.isPS4CPU())
AddPath(BaseSDKPath + "/target/include_common", System, false);
LLVM_FALLTHROUGH;
}
default:
AddPath("/usr/include", ExternCSystem, false);
break;
}
}