@@ -293,10 +293,10 @@ class Triple {
293
293
// / @name Normalization
294
294
// / @{
295
295
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.
300
300
static std::string normalize (StringRef Str);
301
301
302
302
// / Return the normalized form of this triple's string.
@@ -306,25 +306,24 @@ class Triple {
306
306
// / @name Typed Component Access
307
307
// / @{
308
308
309
- // / getArch - Get the parsed architecture type of this triple.
309
+ // / Get the parsed architecture type of this triple.
310
310
ArchType getArch () const { return Arch; }
311
311
312
- // / getSubArch - get the parsed subarchitecture type for this triple.
312
+ // / get the parsed subarchitecture type for this triple.
313
313
SubArchType getSubArch () const { return SubArch; }
314
314
315
- // / getVendor - Get the parsed vendor type of this triple.
315
+ // / Get the parsed vendor type of this triple.
316
316
VendorType getVendor () const { return Vendor; }
317
317
318
- // / getOS - Get the parsed operating system type of this triple.
318
+ // / Get the parsed operating system type of this triple.
319
319
OSType getOS () const { return OS; }
320
320
321
- // / hasEnvironment - Does this triple have the optional environment
322
- // / (fourth) component?
321
+ // / Does this triple have the optional environment (fourth) component?
323
322
bool hasEnvironment () const {
324
323
return getEnvironmentName () != " " ;
325
324
}
326
325
327
- // / getEnvironment - Get the parsed environment type of this triple.
326
+ // / Get the parsed environment type of this triple.
328
327
EnvironmentType getEnvironment () const { return Environment; }
329
328
330
329
// / Parse the version number from the OS name component of the
@@ -336,39 +335,39 @@ class Triple {
336
335
void getEnvironmentVersion (unsigned &Major, unsigned &Minor,
337
336
unsigned &Micro) const ;
338
337
339
- // / getFormat - Get the object format for this triple.
338
+ // / Get the object format for this triple.
340
339
ObjectFormatType getObjectFormat () const { return ObjectFormat; }
341
340
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.
344
343
// /
345
344
// / For example, "fooos1.2.3" would return (1, 2, 3).
346
345
// /
347
346
// / If an entry is not defined, it will be returned as 0.
348
347
void getOSVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const ;
349
348
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.
352
351
unsigned getOSMajorVersion () const {
353
352
unsigned Maj, Min, Micro;
354
353
getOSVersion (Maj, Min, Micro);
355
354
return Maj;
356
355
}
357
356
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.
362
361
bool getMacOSXVersion (unsigned &Major, unsigned &Minor,
363
362
unsigned &Micro) const ;
364
363
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.
367
366
void getiOSVersion (unsigned &Major, unsigned &Minor,
368
367
unsigned &Micro) const ;
369
368
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.
372
371
void getWatchOSVersion (unsigned &Major, unsigned &Minor,
373
372
unsigned &Micro) const ;
374
373
@@ -380,27 +379,24 @@ class Triple {
380
379
381
380
const std::string &getTriple () const { return Data; }
382
381
383
- // / getArchName - Get the architecture (first) component of the
384
- // / triple.
382
+ // / Get the architecture (first) component of the triple.
385
383
StringRef getArchName () const ;
386
384
387
- // / getArchName - Get the architecture name based on Kind and SubArch.
385
+ // / Get the architecture name based on Kind and SubArch.
388
386
StringRef getArchName (ArchType Kind, SubArchType SubArch = NoSubArch) const ;
389
387
390
- // / getVendorName - Get the vendor (second) component of the triple.
388
+ // / Get the vendor (second) component of the triple.
391
389
StringRef getVendorName () const ;
392
390
393
- // / getOSName - Get the operating system (third) component of the
394
- // / triple.
391
+ // / Get the operating system (third) component of the triple.
395
392
StringRef getOSName () const ;
396
393
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.
399
396
StringRef getEnvironmentName () const ;
400
397
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).
404
400
StringRef getOSAndEnvironmentName () const ;
405
401
406
402
// / @}
@@ -426,8 +422,8 @@ class Triple {
426
422
// / Note that this tests for 16-bit pointer width, and nothing else.
427
423
bool isArch16Bit () const ;
428
424
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.
431
427
bool isOSVersionLT (unsigned Major, unsigned Minor = 0 ,
432
428
unsigned Micro = 0 ) const {
433
429
unsigned LHS[3 ];
@@ -449,14 +445,13 @@ class Triple {
449
445
return isOSVersionLT (RHS[0 ], RHS[1 ], RHS[2 ]);
450
446
}
451
447
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.
455
450
bool isMacOSXVersionLT (unsigned Major, unsigned Minor = 0 ,
456
451
unsigned Micro = 0 ) const ;
457
452
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.
460
455
bool isMacOSX () const {
461
456
return getOS () == Triple::Darwin || getOS () == Triple::MacOSX;
462
457
}
@@ -486,7 +481,7 @@ class Triple {
486
481
487
482
bool isOSzOS () const { return getOS () == Triple::ZOS; }
488
483
489
- // / isOSDarwin - Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
484
+ // / Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
490
485
bool isOSDarwin () const {
491
486
return isMacOSX () || isiOS () || isWatchOS ();
492
487
}
@@ -839,46 +834,38 @@ class Triple {
839
834
// / @name Mutators
840
835
// / @{
841
836
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.
844
838
void setArch (ArchType Kind, SubArchType SubArch = NoSubArch);
845
839
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.
848
841
void setVendor (VendorType Kind);
849
842
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.
852
844
void setOS (OSType Kind);
853
845
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.
856
847
void setEnvironment (EnvironmentType Kind);
857
848
858
- // / setObjectFormat - Set the object file format
849
+ // / Set the object file format.
859
850
void setObjectFormat (ObjectFormatType Kind);
860
851
861
- // / setTriple - Set all components to the new triple \p Str.
852
+ // / Set all components to the new triple \p Str.
862
853
void setTriple (const Twine &Str);
863
854
864
- // / setArchName - Set the architecture (first) component of the
865
- // / triple by name.
855
+ // / Set the architecture (first) component of the triple by name.
866
856
void setArchName (StringRef Str);
867
857
868
- // / setVendorName - Set the vendor (second) component of the triple
869
- // / by name.
858
+ // / Set the vendor (second) component of the triple by name.
870
859
void setVendorName (StringRef Str);
871
860
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.
874
862
void setOSName (StringRef Str);
875
863
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.
878
865
void setEnvironmentName (StringRef Str);
879
866
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.
882
869
void setOSAndEnvironmentName (StringRef Str);
883
870
884
871
// / @}
@@ -944,33 +931,30 @@ class Triple {
944
931
// / @name Static helpers for IDs.
945
932
// / @{
946
933
947
- // / getArchTypeName - Get the canonical name for the \p Kind architecture.
934
+ // / Get the canonical name for the \p Kind architecture.
948
935
static StringRef getArchTypeName (ArchType Kind);
949
936
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().
954
940
// /
955
941
// / \return - The architecture prefix, or 0 if none is defined.
956
942
static StringRef getArchTypePrefix (ArchType Kind);
957
943
958
- // / getVendorTypeName - Get the canonical name for the \p Kind vendor.
944
+ // / Get the canonical name for the \p Kind vendor.
959
945
static StringRef getVendorTypeName (VendorType Kind);
960
946
961
- // / getOSTypeName - Get the canonical name for the \p Kind operating system.
947
+ // / Get the canonical name for the \p Kind operating system.
962
948
static StringRef getOSTypeName (OSType Kind);
963
949
964
- // / getEnvironmentTypeName - Get the canonical name for the \p Kind
965
- // / environment.
950
+ // / Get the canonical name for the \p Kind environment.
966
951
static StringRef getEnvironmentTypeName (EnvironmentType Kind);
967
952
968
953
// / @}
969
954
// / @name Static helpers for converting alternate architecture names.
970
955
// / @{
971
956
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").
974
958
static ArchType getArchTypeForLLVMName (StringRef Str);
975
959
976
960
// / @}
0 commit comments