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 1717#include " clang/Basic/LLVM.h"
1818#include " llvm/ADT/Twine.h"
1919#include " llvm/Support/raw_ostream.h"
20- #include < optional>
2120
2221namespace clang {
2322
@@ -30,11 +29,11 @@ class MacroBuilder {
3029 // / If DeprecationMsg is provided, also append a pragma to deprecate the
3130 // / defined macro.
3231 void defineMacro (const Twine &Name, const Twine &Value = " 1" ,
33- std::optional< Twine> DeprecationMsg = std:: nullopt ) {
32+ Twine DeprecationMsg = " " ) {
3433 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 " ;
3837 }
3938
4039 // / 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