Pass llvm::Triple objects by const reference.
Copying isn't cheap as it contains a std::string.
llvm-svn: 202880
diff --git a/clang/lib/Sema/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp
index 7258b37..c4c1b80 100644
--- a/clang/lib/Sema/AttributeList.cpp
+++ b/clang/lib/Sema/AttributeList.cpp
@@ -155,7 +155,7 @@
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);
};
@@ -195,7 +195,7 @@
return getInfo(*this).IsType;
}
-bool AttributeList::existsInTarget(llvm::Triple T) const {
+bool AttributeList::existsInTarget(const llvm::Triple &T) const {
return getInfo(*this).ExistsInTarget(T);
}