1 //===-- Version.cpp -------------------------------------------------------===//
2 //
3 // This source file is part of the Swift.org open source project
4 //
5 // Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6 // Licensed under Apache License v2.0 with Runtime Library Exception
7 //
8 // See http://swift.org/LICENSE.txt for license information
9 // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "llbuild/Basic/Version.h"
14 
15 #include <string>
16 
17 namespace llbuild {
18 
getLLBuildFullVersion(StringRef productName)19 std::string getLLBuildFullVersion(StringRef productName) {
20   std::string result = productName.str() + " version 3.0";
21 
22   // Include the additional build version information, if present.
23 #ifdef LLBUILD_VENDOR_STRING
24   result = std::string(LLBUILD_VENDOR_STRING) + " " + result;
25 #endif
26 #ifdef LLBUILD_VERSION_STRING
27   result = result + " (" + std::string(LLBUILD_VERSION_STRING) + ")";
28 #endif
29 
30   return result;
31 }
32 
33 }
34