unsigned getMaxArgs() const;
bool diagnoseAppertainsTo(class Sema &S, const Decl *D) const;
bool diagnoseLangOpts(class Sema &S) const;
- bool existsInTarget(llvm::Triple T) const;
+ bool existsInTarget(const llvm::Triple &T) const;
bool isKnownToGCC() const;
/// \brief If the parsed attribute has a semantic equivalent, and it would
static StdOrFastCC getStdOrFastCallMangling(const ASTContext &Context,
const NamedDecl *ND) {
const TargetInfo &TI = Context.getTargetInfo();
- llvm::Triple Triple = TI.getTriple();
+ const llvm::Triple &Triple = TI.getTriple();
if (!Triple.isOSWindows() || Triple.getArch() != llvm::Triple::x86)
return SOF_OTHER;
/// a target-triple directory in the library and header search paths.
/// Unfortunately, this triple does not align with the vanilla target triple,
/// so we provide a rough mapping here.
-static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
+static std::string getMultiarchTriple(const llvm::Triple &TargetTriple,
StringRef SysRoot) {
// For most architectures, just use whatever we have rather than trying to be
// clever.
} else if (getToolChain().getArch() == llvm::Triple::arm ||
getToolChain().getArch() == llvm::Triple::thumb) {
const Driver &D = getToolChain().getDriver();
- llvm::Triple Triple = getToolChain().getTriple();
+ const llvm::Triple &Triple = getToolChain().getTriple();
StringRef FloatABI = arm::getARMFloatABI(D, Args, Triple);
if (FloatABI == "hard") {
SplitDebugName(Args, Inputs));
}
-static void AddLibgcc(llvm::Triple Triple, const Driver &D,
+static void AddLibgcc(const llvm::Triple &Triple, const Driver &D,
ArgStringList &CmdArgs, const ArgList &Args) {
bool isAndroid = Triple.getEnvironment() == llvm::Triple::Android;
bool StaticLibgcc = Args.hasArg(options::OPT_static_libgcc) ||
SmallVector<StringRef, 4> ClobberRefs;
// We need an actual supported target.
- llvm::Triple TheTriple = Actions.Context.getTargetInfo().getTriple();
+ const llvm::Triple &TheTriple = Actions.Context.getTargetInfo().getTriple();
llvm::Triple::ArchType ArchTy = TheTriple.getArch();
const std::string &TT = TheTriple.getTriple();
const llvm::Target *TheTarget = 0;
bool (*DiagAppertainsToDecl)(Sema &S, const AttributeList &Attr,
const Decl *);
bool (*DiagLangOpts)(Sema &S, const AttributeList &Attr);
- bool (*ExistsInTarget)(llvm::Triple T);
+ bool (*ExistsInTarget)(const llvm::Triple &T);
unsigned (*SpellingIndexToSemanticSpelling)(const AttributeList &Attr);
};
return getInfo(*this).IsType;
}
-bool AttributeList::existsInTarget(llvm::Triple T) const {
+bool AttributeList::existsInTarget(const llvm::Triple &T) const {
return getInfo(*this).ExistsInTarget(T);
}
}
static void GenerateDefaultTargetRequirements(raw_ostream &OS) {
- OS << "static bool defaultTargetRequirements(llvm::Triple) {\n";
+ OS << "static bool defaultTargetRequirements(const llvm::Triple &) {\n";
OS << " return true;\n";
OS << "}\n\n";
}
if (I != CustomTargetSet.end())
return *I;
- OS << "static bool " << FnName << "(llvm::Triple T) {\n";
+ OS << "static bool " << FnName << "(const llvm::Triple &T) {\n";
OS << " llvm::Triple::ArchType Arch = T.getArch();\n";
if (UsesOS)
OS << " llvm::Triple::OSType OS = T.getOS();\n";