Граф коммитов

29 Коммитов

Автор SHA1 Сообщение Дата
Benjamin Kramer 242cb06505 Only emit one set of braces for __VERSION__, getClangFullRepositoryVersion already adds some.
No test as the output is highly dependend on the local configuration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157520 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-26 19:39:52 +00:00
Andrew Trick fddfbdbf14 More git-svn compatible version string, by request.
If you're using git-svn, the clang and llvm repository will typically
map to a different revision.

Before we had:
clang version 3.1 (trunk 152167 trunk 152162)

After this change:
clang version 3.1 (trunk 152167) (llvm/trunk 152162)

So it's self-descriptive with an extra parens group. Which is more
compatible with version string parsers is probably debatable, but this
style was requested.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152183 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-07 00:44:24 +00:00
Jia Liu f8e5d4cf39 clang -v support for separate clang.git and llvm.git, patch by Andrew Trick.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151910 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02 14:37:41 +00:00
Eli Friedman fb8c56d604 Partially revert r147195; lib/Basic/Version.cpp conditionally depends on config.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147282 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-26 22:43:17 +00:00
Dylan Noblesmith 1770e0dadc remove unneeded config.h includes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147195 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-22 22:49:47 +00:00
Chris Lattner 5f9e272e63 remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 10:55:15 +00:00
Jay Foad f1cc1d0efd Like the coding standards say, do not use "using namespace std".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 09:06:00 +00:00
Daniel Dunbar ad1a4c6e89 Change Clang's __VERSION__ to include the same basic info as in clang -v.
- Please never ever ever ever write a tool that sniffs this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128599 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 00:53:51 +00:00
Daniel Dunbar 9a4a9c25fc Basic: Add support for a build variable to set the repository path that goes
into the Clang version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128595 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 00:32:50 +00:00
Daniel Dunbar 83e18f8060 Basic: Tweak attempt to make version tags work from 'svn export's again, clip
off the extra parts of the $URL$ SVN keyword.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 23:50:34 +00:00
Daniel Dunbar 7171f2aaf9 Basic: Attempt to make version tags work from 'svn export's again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116268 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 23:44:19 +00:00
Daniel Dunbar ddb6c8df46 Driver: When clang is built with a VENDOR set, include the base LLVM version in
the version information, to help prevent user confusion about vendor version
numbers vs. LLVM version numbers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 15:00:30 +00:00
Daniel Dunbar 16a8fb7e9d Basic: Simplify getClangRepositoryPath and getClangRevision.
- I don't like returning StringRef's ever, unless it is actually important for
   performance, which it isn't here.

 - Also, stop validating getClangRevision to be an integer, I don't see a good
   reason to do this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115071 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 19:15:29 +00:00
Daniel Dunbar 640cf37c94 Basic: Add support for git svn to get the repo version in clang executable,
patch by Jonathan Mulder!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115049 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 17:57:10 +00:00
Daniel Dunbar 4cadeec91b Basic: Update getClangRepositoryPath for my change to integration branch layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103192 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 18:39:38 +00:00
Benjamin Kramer 940f646548 Make sure the raw_string_ostream gets flushed so we don't accidentally return an empty string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 15:39:20 +00:00
Ted Kremenek ec5008807b Use SVN_REVISION, not SVN_VERSION.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:30:39 +00:00
Ted Kremenek 971cc48dca Make getClangRevision() check that SVN_VERSION is an empty string
(even if it is defined).  This fixes the issue of this function
returning '0' when SVN_VERSION is defined to be "".

Fixes: <rdar://problem/7663667>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:02:48 +00:00
Ted Kremenek 974be4d50a Fix bug I introduced with assinging a temporary to a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 23:31:14 +00:00
Ted Kremenek a2a9d6e4e5 Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:

getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 22:54:40 +00:00
Benjamin Kramer e242d5f5fa We don't need to place 0 in the URL string now that we return a StringRef.
- URL can go into read only memory now.
- Compilers will fold away all the strstr calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 14:01:39 +00:00
Ted Kremenek a18f1b88a7 Rename getClangFullVendorVersion() to getClangFullVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 02:11:34 +00:00
Ted Kremenek 04bb716aea Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:44:15 +00:00
Ted Kremenek 3687a5d83f Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:29:50 +00:00
Ted Kremenek f7a96a3995 (1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
    agnostic).

(2) Add getClangFullRepositoryVersion(), which contains an
    amalgamation of the repository name and the revision.

(3) Change PCH to only emit the string returned by
    getClangFullRepositoryVersion() instead of also emitting the value
    of getClangSubversionRevision() (which has been removed).  This is
    functionally equivalent.

More cleanup to version string generation pending...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:12:47 +00:00
Ted Kremenek 517e676b9e Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 20:55:35 +00:00
Douglas Gregor 1fbf1f0052 Strip off the /clang/tools/clang at the end of the Subversion URL, if it's there
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 23:46:05 +00:00
Douglas Gregor b8d1191fde Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation. 



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 20:33:49 +00:00
Douglas Gregor 60b5d8ed59 Pre-commit commit to get URL keyword expansion for Clang version information
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 18:52:24 +00:00