Skip to content

Commit 626f044

Browse files
committed
[Triple] Don't repeat the function name in comments. NFC
1 parent 1848525 commit 626f044

File tree

1 file changed

+58
-74
lines changed

1 file changed

+58
-74
lines changed

llvm/include/llvm/ADT/Triple.h

Lines changed: 58 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ class Triple {
293293
/// @name Normalization
294294
/// @{
295295

296-
/// normalize - Turn an arbitrary machine specification into the canonical
297-
/// triple form (or something sensible that the Triple class understands if
298-
/// nothing better can reasonably be done). In particular, it handles the
299-
/// common case in which otherwise valid components are in the wrong order.
296+
/// Turn an arbitrary machine specification into the canonical triple form (or
297+
/// something sensible that the Triple class understands if nothing better can
298+
/// reasonably be done). In particular, it handles the common case in which
299+
/// otherwise valid components are in the wrong order.
300300
static std::string normalize(StringRef Str);
301301

302302
/// Return the normalized form of this triple's string.
@@ -306,25 +306,24 @@ class Triple {
306306
/// @name Typed Component Access
307307
/// @{
308308

309-
/// getArch - Get the parsed architecture type of this triple.
309+
/// Get the parsed architecture type of this triple.
310310
ArchType getArch() const { return Arch; }
311311

312-
/// getSubArch - get the parsed subarchitecture type for this triple.
312+
/// get the parsed subarchitecture type for this triple.
313313
SubArchType getSubArch() const { return SubArch; }
314314

315-
/// getVendor - Get the parsed vendor type of this triple.
315+
/// Get the parsed vendor type of this triple.
316316
VendorType getVendor() const { return Vendor; }
317317

318-
/// getOS - Get the parsed operating system type of this triple.
318+
/// Get the parsed operating system type of this triple.
319319
OSType getOS() const { return OS; }
320320

321-
/// hasEnvironment - Does this triple have the optional environment
322-
/// (fourth) component?
321+
/// Does this triple have the optional environment (fourth) component?
323322
bool hasEnvironment() const {
324323
return getEnvironmentName() != "";
325324
}
326325

327-
/// getEnvironment - Get the parsed environment type of this triple.
326+
/// Get the parsed environment type of this triple.
328327
EnvironmentType getEnvironment() const { return Environment; }
329328

330329
/// Parse the version number from the OS name component of the
@@ -336,39 +335,39 @@ class Triple {
336335
void getEnvironmentVersion(unsigned &Major, unsigned &Minor,
337336
unsigned &Micro) const;
338337

339-
/// getFormat - Get the object format for this triple.
338+
/// Get the object format for this triple.
340339
ObjectFormatType getObjectFormat() const { return ObjectFormat; }
341340

342-
/// getOSVersion - Parse the version number from the OS name component of the
343-
/// triple, if present.
341+
/// Parse the version number from the OS name component of the triple, if
342+
/// present.
344343
///
345344
/// For example, "fooos1.2.3" would return (1, 2, 3).
346345
///
347346
/// If an entry is not defined, it will be returned as 0.
348347
void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const;
349348

350-
/// getOSMajorVersion - Return just the major version number, this is
351-
/// specialized because it is a common query.
349+
/// Return just the major version number, this is specialized because it is a
350+
/// common query.
352351
unsigned getOSMajorVersion() const {
353352
unsigned Maj, Min, Micro;
354353
getOSVersion(Maj, Min, Micro);
355354
return Maj;
356355
}
357356

358-
/// getMacOSXVersion - Parse the version number as with getOSVersion and then
359-
/// translate generic "darwin" versions to the corresponding OS X versions.
360-
/// This may also be called with IOS triples but the OS X version number is
361-
/// just set to a constant 10.4.0 in that case. Returns true if successful.
357+
/// Parse the version number as with getOSVersion and then translate generic
358+
/// "darwin" versions to the corresponding OS X versions. This may also be
359+
/// called with IOS triples but the OS X version number is just set to a
360+
/// constant 10.4.0 in that case. Returns true if successful.
362361
bool getMacOSXVersion(unsigned &Major, unsigned &Minor,
363362
unsigned &Micro) const;
364363

365-
/// getiOSVersion - Parse the version number as with getOSVersion. This should
366-
/// only be called with IOS or generic triples.
364+
/// Parse the version number as with getOSVersion. This should only be called
365+
/// with IOS or generic triples.
367366
void getiOSVersion(unsigned &Major, unsigned &Minor,
368367
unsigned &Micro) const;
369368

370-
/// getWatchOSVersion - Parse the version number as with getOSVersion. This
371-
/// should only be called with WatchOS or generic triples.
369+
/// Parse the version number as with getOSVersion. This should only be called
370+
/// with WatchOS or generic triples.
372371
void getWatchOSVersion(unsigned &Major, unsigned &Minor,
373372
unsigned &Micro) const;
374373

@@ -380,27 +379,24 @@ class Triple {
380379

381380
const std::string &getTriple() const { return Data; }
382381

383-
/// getArchName - Get the architecture (first) component of the
384-
/// triple.
382+
/// Get the architecture (first) component of the triple.
385383
StringRef getArchName() const;
386384

387-
/// getArchName - Get the architecture name based on Kind and SubArch.
385+
/// Get the architecture name based on Kind and SubArch.
388386
StringRef getArchName(ArchType Kind, SubArchType SubArch = NoSubArch) const;
389387

390-
/// getVendorName - Get the vendor (second) component of the triple.
388+
/// Get the vendor (second) component of the triple.
391389
StringRef getVendorName() const;
392390

393-
/// getOSName - Get the operating system (third) component of the
394-
/// triple.
391+
/// Get the operating system (third) component of the triple.
395392
StringRef getOSName() const;
396393

397-
/// getEnvironmentName - Get the optional environment (fourth)
398-
/// component of the triple, or "" if empty.
394+
/// Get the optional environment (fourth) component of the triple, or "" if
395+
/// empty.
399396
StringRef getEnvironmentName() const;
400397

401-
/// getOSAndEnvironmentName - Get the operating system and optional
402-
/// environment components as a single string (separated by a '-'
403-
/// if the environment component is present).
398+
/// Get the operating system and optional environment components as a single
399+
/// string (separated by a '-' if the environment component is present).
404400
StringRef getOSAndEnvironmentName() const;
405401

406402
/// @}
@@ -426,8 +422,8 @@ class Triple {
426422
/// Note that this tests for 16-bit pointer width, and nothing else.
427423
bool isArch16Bit() const;
428424

429-
/// isOSVersionLT - Helper function for doing comparisons against version
430-
/// numbers included in the target triple.
425+
/// Helper function for doing comparisons against version numbers included in
426+
/// the target triple.
431427
bool isOSVersionLT(unsigned Major, unsigned Minor = 0,
432428
unsigned Micro = 0) const {
433429
unsigned LHS[3];
@@ -449,14 +445,13 @@ class Triple {
449445
return isOSVersionLT(RHS[0], RHS[1], RHS[2]);
450446
}
451447

452-
/// isMacOSXVersionLT - Comparison function for checking OS X version
453-
/// compatibility, which handles supporting skewed version numbering schemes
454-
/// used by the "darwin" triples.
448+
/// Comparison function for checking OS X version compatibility, which handles
449+
/// supporting skewed version numbering schemes used by the "darwin" triples.
455450
bool isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
456451
unsigned Micro = 0) const;
457452

458-
/// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both
459-
/// "darwin" and "osx" as OS X triples.
453+
/// Is this a Mac OS X triple. For legacy reasons, we support both "darwin"
454+
/// and "osx" as OS X triples.
460455
bool isMacOSX() const {
461456
return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
462457
}
@@ -486,7 +481,7 @@ class Triple {
486481

487482
bool isOSzOS() const { return getOS() == Triple::ZOS; }
488483

489-
/// isOSDarwin - Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
484+
/// Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
490485
bool isOSDarwin() const {
491486
return isMacOSX() || isiOS() || isWatchOS();
492487
}
@@ -839,46 +834,38 @@ class Triple {
839834
/// @name Mutators
840835
/// @{
841836

842-
/// setArch - Set the architecture (first) component of the triple
843-
/// to a known type.
837+
/// Set the architecture (first) component of the triple to a known type.
844838
void setArch(ArchType Kind, SubArchType SubArch = NoSubArch);
845839

846-
/// setVendor - Set the vendor (second) component of the triple to a
847-
/// known type.
840+
/// Set the vendor (second) component of the triple to a known type.
848841
void setVendor(VendorType Kind);
849842

850-
/// setOS - Set the operating system (third) component of the triple
851-
/// to a known type.
843+
/// Set the operating system (third) component of the triple to a known type.
852844
void setOS(OSType Kind);
853845

854-
/// setEnvironment - Set the environment (fourth) component of the triple
855-
/// to a known type.
846+
/// Set the environment (fourth) component of the triple to a known type.
856847
void setEnvironment(EnvironmentType Kind);
857848

858-
/// setObjectFormat - Set the object file format
849+
/// Set the object file format.
859850
void setObjectFormat(ObjectFormatType Kind);
860851

861-
/// setTriple - Set all components to the new triple \p Str.
852+
/// Set all components to the new triple \p Str.
862853
void setTriple(const Twine &Str);
863854

864-
/// setArchName - Set the architecture (first) component of the
865-
/// triple by name.
855+
/// Set the architecture (first) component of the triple by name.
866856
void setArchName(StringRef Str);
867857

868-
/// setVendorName - Set the vendor (second) component of the triple
869-
/// by name.
858+
/// Set the vendor (second) component of the triple by name.
870859
void setVendorName(StringRef Str);
871860

872-
/// setOSName - Set the operating system (third) component of the
873-
/// triple by name.
861+
/// Set the operating system (third) component of the triple by name.
874862
void setOSName(StringRef Str);
875863

876-
/// setEnvironmentName - Set the optional environment (fourth)
877-
/// component of the triple by name.
864+
/// Set the optional environment (fourth) component of the triple by name.
878865
void setEnvironmentName(StringRef Str);
879866

880-
/// setOSAndEnvironmentName - Set the operating system and optional
881-
/// environment components with a single string.
867+
/// Set the operating system and optional environment components with a single
868+
/// string.
882869
void setOSAndEnvironmentName(StringRef Str);
883870

884871
/// @}
@@ -944,33 +931,30 @@ class Triple {
944931
/// @name Static helpers for IDs.
945932
/// @{
946933

947-
/// getArchTypeName - Get the canonical name for the \p Kind architecture.
934+
/// Get the canonical name for the \p Kind architecture.
948935
static StringRef getArchTypeName(ArchType Kind);
949936

950-
/// getArchTypePrefix - Get the "prefix" canonical name for the \p Kind
951-
/// architecture. This is the prefix used by the architecture specific
952-
/// builtins, and is suitable for passing to \see
953-
/// Intrinsic::getIntrinsicForGCCBuiltin().
937+
/// Get the "prefix" canonical name for the \p Kind architecture. This is the
938+
/// prefix used by the architecture specific builtins, and is suitable for
939+
/// passing to \see Intrinsic::getIntrinsicForGCCBuiltin().
954940
///
955941
/// \return - The architecture prefix, or 0 if none is defined.
956942
static StringRef getArchTypePrefix(ArchType Kind);
957943

958-
/// getVendorTypeName - Get the canonical name for the \p Kind vendor.
944+
/// Get the canonical name for the \p Kind vendor.
959945
static StringRef getVendorTypeName(VendorType Kind);
960946

961-
/// getOSTypeName - Get the canonical name for the \p Kind operating system.
947+
/// Get the canonical name for the \p Kind operating system.
962948
static StringRef getOSTypeName(OSType Kind);
963949

964-
/// getEnvironmentTypeName - Get the canonical name for the \p Kind
965-
/// environment.
950+
/// Get the canonical name for the \p Kind environment.
966951
static StringRef getEnvironmentTypeName(EnvironmentType Kind);
967952

968953
/// @}
969954
/// @name Static helpers for converting alternate architecture names.
970955
/// @{
971956

972-
/// getArchTypeForLLVMName - The canonical type for the given LLVM
973-
/// architecture name (e.g., "x86").
957+
/// The canonical type for the given LLVM architecture name (e.g., "x86").
974958
static ArchType getArchTypeForLLVMName(StringRef Str);
975959

976960
/// @}

0 commit comments

Comments
 (0)