Clean up comments that I missed when changing the triple representation.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 21 Feb 2012 08:31:18 +0000 (08:31 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 21 Feb 2012 08:31:18 +0000 (08:31 +0000)
Somehow, I even missed the ones I wrote just the other day...

Thanks to Matt for the code review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151045 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h
lib/Support/Triple.cpp

index 1266da96a1ad56e48689ce06e6c3b6f277a445e1..272ede1738b76143d336fe5060010691d919e02f 100644 (file)
@@ -132,7 +132,8 @@ public:
   /// @name Constructors
   /// @{
 
-  /// \brief Default constructor produces an empty, invalid triple.
+  /// \brief Default constructor is the same as an empty string and leaves all
+  /// triple fields unknown.
   Triple() : Data(), Arch(), Vendor(), OS(), Environment() {}
 
   explicit Triple(const Twine &Str);
index af951fe9002bed24e4810e6aa0989a935e522535..b5aa5190692a42c76325b5bda4ac8ddc5acad194 100644 (file)
@@ -292,10 +292,8 @@ Triple::EnvironmentType Triple::ParseEnvironment(StringRef EnvironmentName) {
 
 /// \brief Construct a triple from the string representation provided.
 ///
-/// This doesn't actually parse the string representation eagerly. Instead it
-/// stores it, and tracks the fact that it hasn't been parsed. The first time
-/// any of the structural queries are made, the string is parsed and the
-/// results cached in various members.
+/// This stores the string representation and parses the various pieces into
+/// enum members.
 Triple::Triple(const Twine &Str)
     : Data(Str.str()),
       Arch(ParseArch(getArchName())),
@@ -307,9 +305,9 @@ Triple::Triple(const Twine &Str)
 /// \brief Construct a triple from string representations of the architecture,
 /// vendor, and OS.
 ///
-/// This doesn't actually use these already distinct strings to setup the
-/// triple information. Instead it joins them into a canonical form of a triple
-/// string, and lazily parses it on use.
+/// This joins each argument into a canonical string representation and parses
+/// them into enum members. It leaves the environment unknown and omits it from
+/// the string representation.
 Triple::Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr)
     : Data((ArchStr + Twine('-') + VendorStr + Twine('-') + OSStr).str()),
       Arch(ParseArch(ArchStr.str())),
@@ -321,9 +319,8 @@ Triple::Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr)
 /// \brief Construct a triple from string representations of the architecture,
 /// vendor, OS, and environment.
 ///
-/// This doesn't actually use these already distinct strings to setup the
-/// triple information. Instead it joins them into a canonical form of a triple
-/// string, and lazily parses it on use.
+/// This joins each argument into a canonical string representation and parses
+/// them into enum members.
 Triple::Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr,
                const Twine &EnvironmentStr)
     : Data((ArchStr + Twine('-') + VendorStr + Twine('-') + OSStr + Twine('-') +