summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-02-21 08:31:18 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-02-21 08:31:18 +0000
commit1f3325a6d9baf21c27a530d34921c71bec821ba8 (patch)
treea6180f0a16d91fe537eeb2f69ab4d55f10523993 /llvm/lib
parent789456bf68dd404a09bbf21e752eaefb24bed254 (diff)
downloadbcm5719-llvm-1f3325a6d9baf21c27a530d34921c71bec821ba8.tar.gz
bcm5719-llvm-1f3325a6d9baf21c27a530d34921c71bec821ba8.zip
Clean up comments that I missed when changing the triple representation.
Somehow, I even missed the ones I wrote just the other day... Thanks to Matt for the code review. llvm-svn: 151045
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Triple.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index af951fe9002..b5aa5190692 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -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('-') +
OpenPOWER on IntegriCloud