aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-18 19:26:55 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-18 19:26:55 +0000
commit661f71a2567326879e4eac855225b2d7e1a44011 (patch)
treeecd1967cfa05a67497cf0275abcb468ab04108c0 /include/llvm/ADT
parent066ed6a19998f933d53d79d7a67390cfa2907065 (diff)
downloadexternal_llvm-661f71a2567326879e4eac855225b2d7e1a44011.zip
external_llvm-661f71a2567326879e4eac855225b2d7e1a44011.tar.gz
external_llvm-661f71a2567326879e4eac855225b2d7e1a44011.tar.bz2
Improve Triple to recognize the OS in i386-mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/Triple.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index a74fde3..c63d91b 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -29,8 +29,22 @@ class Twine;
/// behavior for particular targets. This class isolates the mapping
/// from the components of the target triple to well known IDs.
///
-/// See autoconf/config.guess for a glimpse into what they look like
-/// in practice.
+/// At its core the Triple class is designed to be a wrapper for a triple
+/// string; it does not normally change or normalize the triple string, instead
+/// it provides additional APIs to parse normalized parts out of the triple.
+///
+/// One curiosity this implies is that for some odd triples the results of,
+/// e.g., getOSName() can be very different from the result of getOS(). For
+/// example, for 'i386-mingw32', getOS() will return MinGW32, but since
+/// getOSName() is purely based on the string structure that will return the
+/// empty string.
+///
+/// Clients should generally avoid using getOSName() and related APIs unless
+/// they are familiar with the triple format (this is particularly true when
+/// rewriting a triple).
+///
+/// See autoconf/config.guess for a glimpse into what they look like in
+/// practice.
class Triple {
public:
enum ArchType {