summaryrefslogtreecommitdiff
path: root/lib/Basic
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-10-06 16:46:02 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-10-06 16:46:02 +0000
commit835452b27aa416dbe5e4e0f94a0d7aeda202f0e8 (patch)
tree94daf7eb40d795da1e4ce9ae62e969e8b44971e4 /lib/Basic
parent788b8364be54d27a6981c76b4f670b5ac3b66bd8 (diff)
downloadclang-835452b27aa416dbe5e4e0f94a0d7aeda202f0e8.tar.gz
Patch to wrap up '_' as separator in version numbers
in availability attribute by preserving this info. in VersionTuple and using it in pretty printing of attributes and yet using '.' as separator when diagnosing unavailable message calls. rdar://18490958 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/VersionTuple.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Basic/VersionTuple.cpp b/lib/Basic/VersionTuple.cpp
index 8b781ab0a3..aa43ae298e 100644
--- a/lib/Basic/VersionTuple.cpp
+++ b/lib/Basic/VersionTuple.cpp
@@ -29,9 +29,9 @@ raw_ostream& clang::operator<<(raw_ostream &Out,
const VersionTuple &V) {
Out << V.getMajor();
if (Optional<unsigned> Minor = V.getMinor())
- Out << '.' << *Minor;
+ Out << (V.usesUnderscores() ? '_' : '.') << *Minor;
if (Optional<unsigned> Subminor = V.getSubminor())
- Out << '.' << *Subminor;
+ Out << (V.usesUnderscores() ? '_' : '.') << *Subminor;
return Out;
}