File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
clang/include/clang/Basic Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 17
17
#include " clang/Basic/LLVM.h"
18
18
#include " llvm/ADT/Twine.h"
19
19
#include " llvm/Support/raw_ostream.h"
20
- #include < optional>
21
20
22
21
namespace clang {
23
22
@@ -30,11 +29,11 @@ class MacroBuilder {
30
29
// / If DeprecationMsg is provided, also append a pragma to deprecate the
31
30
// / defined macro.
32
31
void defineMacro (const Twine &Name, const Twine &Value = " 1" ,
33
- std::optional< Twine> DeprecationMsg = std::nullopt ) {
32
+ Twine DeprecationMsg = " " ) {
34
33
Out << " #define " << Name << ' ' << Value << ' \n ' ;
35
- if (DeprecationMsg.has_value ())
36
- Out << " #pragma clang deprecated(" << Name << " , \" "
37
- << DeprecationMsg. value () << " \" )\n " ;
34
+ if (! DeprecationMsg.isTriviallyEmpty ())
35
+ Out << " #pragma clang deprecated(" << Name << " , \" " << DeprecationMsg
36
+ << " \" )\n " ;
38
37
}
39
38
40
39
// / Append a \#undef line for Name. Name should be of the form XXX
You can’t perform that action at this time.
0 commit comments