Skip to content

Commit 0cd3f16

Browse files
SirraideSterling-Augustine
authored andcommitted
[NFC] Make 'Triple&' param a 'const&' instead (llvm#110628)
There isn’t really a reason for it not to be a `const&` (afaict), and it is a bit annoying because some APIs (e.g. `TargetMachine::getTargetTriple()`) return a `const Triple&`.
1 parent 03b50af commit 0cd3f16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/include/llvm/Object/Archive.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ class Archive : public Binary {
339339
Kind kind() const { return (Kind)Format; }
340340
bool isThin() const { return IsThin; }
341341
static object::Archive::Kind getDefaultKind();
342-
static object::Archive::Kind getDefaultKindForTriple(Triple &T);
342+
static object::Archive::Kind getDefaultKindForTriple(const Triple &T);
343343

344344
child_iterator child_begin(Error &Err, bool SkipInternal = true) const;
345345
child_iterator child_end() const;

llvm/lib/Object/Archive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ Archive::Archive(MemoryBufferRef Source, Error &Err)
969969
Err = Error::success();
970970
}
971971

972-
object::Archive::Kind Archive::getDefaultKindForTriple(Triple &T) {
972+
object::Archive::Kind Archive::getDefaultKindForTriple(const Triple &T) {
973973
if (T.isOSDarwin())
974974
return object::Archive::K_DARWIN;
975975
if (T.isOSAIX())

0 commit comments

Comments
 (0)