clang API Documentation

Public Member Functions
clang::MacroBuilder Class Reference

#include <MacroBuilder.h>

List of all members.

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".
void undefineMacro (const Twine &Name)
void append (const Twine &Str)
 Directly append Str and a newline to the underlying buffer.

Detailed Description

Definition at line 24 of file MacroBuilder.h.


Constructor & Destructor Documentation

clang::MacroBuilder::MacroBuilder ( raw_ostream &  Output) [inline]

Definition at line 27 of file MacroBuilder.h.


Member Function Documentation

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.

Referenced by AddImplicitInclude(), AddImplicitIncludeMacros(), AddObjCXXARCLibstdcxxDefines(), and clang::InitializePreprocessor().

void clang::MacroBuilder::defineMacro ( const Twine &  Name,
const Twine &  Value = "1" 
) [inline]
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.

Referenced by clang::InitializePreprocessor().


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