File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ namespace clang {
40
40
// / string as getClangRevision.
41
41
std::string getLLVMRevision ();
42
42
43
- // / Retrieves the Clang vendor tag.
44
- std::string getClangVendor ();
45
-
46
43
// / Retrieves the full repository version that is an amalgamation of
47
44
// / the information in getClangRepositoryPath() and getClangRevision().
48
45
std::string getClangFullRepositoryVersion ();
Original file line number Diff line number Diff line change @@ -57,14 +57,6 @@ std::string getLLVMRevision() {
57
57
#endif
58
58
}
59
59
60
- std::string getClangVendor () {
61
- #ifdef CLANG_VENDOR
62
- return CLANG_VENDOR;
63
- #else
64
- return " " ;
65
- #endif
66
- }
67
-
68
60
std::string getClangFullRepositoryVersion () {
69
61
std::string buf;
70
62
llvm::raw_string_ostream OS (buf);
@@ -100,7 +92,10 @@ std::string getClangFullVersion() {
100
92
std::string getClangToolFullVersion (StringRef ToolName) {
101
93
std::string buf;
102
94
llvm::raw_string_ostream OS (buf);
103
- OS << getClangVendor () << ToolName << " version " CLANG_VERSION_STRING;
95
+ #ifdef CLANG_VENDOR
96
+ OS << CLANG_VENDOR;
97
+ #endif
98
+ OS << ToolName << " version " CLANG_VERSION_STRING;
104
99
105
100
std::string repo = getClangFullRepositoryVersion ();
106
101
if (!repo.empty ()) {
@@ -115,7 +110,10 @@ std::string getClangFullCPPVersion() {
115
110
// the one we report on the command line.
116
111
std::string buf;
117
112
llvm::raw_string_ostream OS (buf);
118
- OS << getClangVendor () << " Clang " CLANG_VERSION_STRING;
113
+ #ifdef CLANG_VENDOR
114
+ OS << CLANG_VENDOR;
115
+ #endif
116
+ OS << " Clang " CLANG_VERSION_STRING;
119
117
120
118
std::string repo = getClangFullRepositoryVersion ();
121
119
if (!repo.empty ()) {
Original file line number Diff line number Diff line change @@ -995,7 +995,12 @@ void CodeGenModule::Release() {
995
995
uint32_t (CLANG_VERSION_MINOR));
996
996
getModule ().addModuleFlag (llvm::Module::Warning, " zos_product_patchlevel" ,
997
997
uint32_t (CLANG_VERSION_PATCHLEVEL));
998
- std::string ProductId = getClangVendor () + " clang" ;
998
+ std::string ProductId;
999
+ #ifdef CLANG_VENDOR
1000
+ ProductId = #CLANG_VENDOR;
1001
+ #else
1002
+ ProductId = " clang" ;
1003
+ #endif
999
1004
getModule ().addModuleFlag (llvm::Module::Error, " zos_product_id" ,
1000
1005
llvm::MDString::get (VMContext, ProductId));
1001
1006
You can’t perform that action at this time.
0 commit comments