From 835452b27aa416dbe5e4e0f94a0d7aeda202f0e8 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 6 Oct 2014 16:46:02 +0000 Subject: 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 --- lib/Basic/VersionTuple.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Basic/VersionTuple.cpp') 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 Minor = V.getMinor()) - Out << '.' << *Minor; + Out << (V.usesUnderscores() ? '_' : '.') << *Minor; if (Optional Subminor = V.getSubminor()) - Out << '.' << *Subminor; + Out << (V.usesUnderscores() ? '_' : '.') << *Subminor; return Out; } -- cgit v1.2.1