Commit Graph

14 Commits

Author SHA1 Message Date
Benjamin Kramer d4870700ad Make sure the raw_string_ostream gets flushed so we don't accidentally return an empty string.
llvm-svn: 97809
2010-03-05 15:39:20 +00:00
Ted Kremenek c9ef64ff67 Use SVN_REVISION, not SVN_VERSION.
llvm-svn: 97625
2010-03-03 01:30:39 +00:00
Ted Kremenek 47307292f1 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>
llvm-svn: 97620
2010-03-03 01:02:48 +00:00
Ted Kremenek 8bd0929d41 Fix bug I introduced with assinging a temporary to a StringRef.
llvm-svn: 96041
2010-02-12 23:31:14 +00:00
Ted Kremenek a3e657064b Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:

getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()

llvm-svn: 96033
2010-02-12 22:54:40 +00:00
Benjamin Kramer a87bdb793e 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.

llvm-svn: 94887
2010-01-30 14:01:39 +00:00
Ted Kremenek 4c0df3dc1d Rename getClangFullVendorVersion() to getClangFullVersion().
llvm-svn: 94273
2010-01-23 02:11:34 +00:00
Ted Kremenek c0f3f72fa4 Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
llvm-svn: 94242
2010-01-22 22:44:15 +00:00
Ted Kremenek 51b8bc93f8 Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
llvm-svn: 94235
2010-01-22 22:29:50 +00:00
Ted Kremenek 18e066f6a9 (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...

llvm-svn: 94231
2010-01-22 22:12:47 +00:00
Ted Kremenek 2377a0e0ea Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
llvm-svn: 94213
2010-01-22 20:55:35 +00:00
Douglas Gregor 4c25ce723f Strip off the /clang/tools/clang at the end of the Subversion URL, if it's there
llvm-svn: 86195
2009-11-05 23:46:05 +00:00
Douglas Gregor 1b7035da6f 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. 

llvm-svn: 83321
2009-10-05 20:33:49 +00:00
Douglas Gregor 7550a6c186 Pre-commit commit to get URL keyword expansion for Clang version information
llvm-svn: 83319
2009-10-05 18:52:24 +00:00