14#ifndef LLVM_CLANG_BASIC_MACROBUILDER_H
15#define LLVM_CLANG_BASIC_MACROBUILDER_H
18#include "llvm/ADT/Twine.h"
19#include "llvm/Support/raw_ostream.h"
32 Twine DeprecationMsg =
"") {
33 Out <<
"#define " << Name <<
' ' <<
Value <<
'\n';
34 if (!DeprecationMsg.isTriviallyEmpty())
35 Out <<
"#pragma clang deprecated(" << Name <<
", \"" << DeprecationMsg
42 Out <<
"#undef " << Name <<
'\n';
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
MacroBuilder(raw_ostream &Output)
void undefineMacro(const Twine &Name)
Append a #undef line for Name.
void defineMacro(const Twine &Name, const Twine &Value="1", Twine DeprecationMsg="")
Append a #define line for macro of the form "\#define Name Value\n".
void append(const Twine &Str)
Directly append Str and a newline to the underlying buffer.
The JSON file list parser is used to communicate input to InstallAPI.