return;
const llvm::Triple &TargetTriple = getTriple();
- const llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
- bool IsTarget64Bit = (TargetArch == llvm::Triple::x86_64 ||
- TargetArch == llvm::Triple::ppc64);
StringRef CxxIncludeRoot(CXX_INCLUDE_ROOT);
if (!CxxIncludeRoot.empty()) {
addLibStdCXXIncludePaths(
CxxIncludeRoot,
- CxxIncludeArch + (IsTarget64Bit ? CXX_INCLUDE_64BIT_DIR
- : CXX_INCLUDE_32BIT_DIR),
+ CxxIncludeArch + (isTarget64Bit() ? CXX_INCLUDE_64BIT_DIR
+ : CXX_INCLUDE_32BIT_DIR),
DriverArgs, CC1Args);
return;
}
// mismatches of just bit width.
llvm::Triple::ArchType HostArch =
llvm::Triple(getDriver().DefaultHostTriple).getArch();
+ llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
StringRef Suffix;
if ((HostArch == llvm::Triple::x86 && TargetArch == llvm::Triple::x86_64) ||
(HostArch == llvm::Triple::ppc && TargetArch == llvm::Triple::ppc64))
virtual bool IsUnwindTablesDefault() const;
virtual const char *GetDefaultRelocationModel() const;
virtual const char *GetForcedPicModel() const;
+
+protected:
+ /// \name ToolChain Implementation Helper Functions
+ /// @{
+
+ /// \brief Check whether the target triple's architecture is 64-bits.
+ bool isTarget64Bit() const {
+ return (getTriple().getArch() == llvm::Triple::x86_64 ||
+ getTriple().getArch() == llvm::Triple::ppc64);
+ }
+ /// \brief Check whether the target triple's architecture is 32-bits.
+ /// FIXME: This should likely do more than just negate the 64-bit query.
+ bool isTarget32Bit() const { return !isTarget64Bit(); }
+
+ /// @}
};
/// Darwin - The base Darwin tool chain.