clang 8.0.0

Public Member Functions | List of all members
clang::MacroBuilder Class Reference

`#include "clang/Basic/MacroBuilder.h"`

## Public Member Functions
| MacroBuilder (raw_ostream &Output)
void | defineMacro (const Twine &Name, const Twine &Value="1")
| Append a #define line for macro of the form "\#define Name Value\n". More...
void | undefineMacro (const Twine &Name)
| Append a #undef line for Name. More...
void | append (const Twine &Str)
| Directly append Str and a newline to the underlying buffer. More...

## Detailed Description

Definition at line 24 of file MacroBuilder.h.

## Constructor & Destructor Documentation

## ◆ MacroBuilder()

clang::MacroBuilder::MacroBuilder | ( | raw_ostream & | Output | ) |
| inline

Definition at line 27 of file MacroBuilder.h.

## Member Function Documentation

## ◆ append()

void clang::MacroBuilder::append | ( | const Twine & | Str | ) |
| inline

Directly append Str and a newline to the underlying buffer.

Definition at line 41 of file MacroBuilder.h.

## ◆ defineMacro()

void clang::MacroBuilder::defineMacro | ( | const Twine & | Name,
|  | const Twine & | Value = `"1"`
| ) |  |
| inline

Append a #define line for macro of the form "\#define Name Value\n".

Definition at line 30 of file MacroBuilder.h.

Referenced by clang::targets::DragonFlyBSDTargetInfo< Target >::getOSDefines(), clang::targets::FreeBSDTargetInfo< Target >::getOSDefines(), clang::targets::KFreeBSDTargetInfo< Target >::getOSDefines(), clang::targets::HaikuTargetInfo< X86_32TargetInfo >::getOSDefines(), clang::targets::HurdTargetInfo< Target >::getOSDefines(), clang::targets::MinixTargetInfo< Target >::getOSDefines(), clang::targets::LinuxTargetInfo< X86_32TargetInfo >::getOSDefines(), clang::targets::NetBSDTargetInfo< X86_32TargetInfo >::getOSDefines(), clang::targets::OpenBSDTargetInfo< X86_32TargetInfo >::getOSDefines(), clang::targets::PSPTargetInfo< Target >::getOSDefines(), clang::targets::PS3PPUTargetInfo< Target >::getOSDefines(), clang::targets::PS4OSTargetInfo< Target >::getOSDefines(), clang::targets::RTEMSTargetInfo< Target >::getOSDefines(), clang::targets::SolarisTargetInfo< Target >::getOSDefines(), clang::targets::WindowsTargetInfo< X86_32TargetInfo >::getOSDefines(), clang::targets::NaClTargetInfo< Target >::getOSDefines(), clang::targets::FuchsiaTargetInfo< Target >::getOSDefines(), clang::targets::WebAssemblyOSTargetInfo< Target >::getOSDefines(), and clang::targets::WindowsTargetInfo< X86_32TargetInfo >::getVisualStudioDefines().

## ◆ undefineMacro()

void clang::MacroBuilder::undefineMacro | ( | const Twine & | Name | ) |
| inline

Append a #undef line for Name.

Name should be of the form XXX and we emit "\#undef XXX".

Definition at line 36 of file MacroBuilder.h.

The documentation for this class was generated from the following file:

- include/clang/Basic/MacroBuilder.h