LLVM API Documentation
#include "CPPTargetMachine.h"#include "llvm/CallingConv.h"#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/InlineAsm.h"#include "llvm/Instruction.h"#include "llvm/Instructions.h"#include "llvm/Module.h"#include "llvm/Pass.h"#include "llvm/PassManager.h"#include "llvm/TypeSymbolTable.h"#include "llvm/ADT/StringExtras.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/FormattedStream.h"#include "llvm/Support/Streams.h"#include "llvm/Target/TargetRegistry.h"#include "llvm/Config/config.h"#include <algorithm>#include <set>
Go to the source code of this file.
Defines | |
| #define | HANDLE_ATTR(X) |
Typedefs | |
| typedef std::vector< const Type * > | TypeList |
| typedef std::map< const Type *, std::string > | TypeMap |
| typedef std::map< const Value *, std::string > | ValueMap |
| typedef std::set< std::string > | NameSet |
| typedef std::set< const Type * > | TypeSet |
| typedef std::set< const Value * > | ValueSet |
| typedef std::map< const Value *, std::string > | ForwardRefMap |
Enumerations | |
| enum | WhatToGenerate { GenProgram, GenModule, GenContents, GenFunction, GenFunctions, GenInline, GenVariable, GenType } |
Functions | |
| void | LLVMInitializeCppBackendTarget () |
| formatted_raw_ostream & | nl (formatted_raw_ostream &Out, int delta=0) |
| void | in () |
| void | out () |
| void | sanitize (std::string &str) |
| std::string | getTypePrefix (const Type *Ty) |
| const std::string * | findTypeName (const TypeSymbolTable &ST, const Type *Ty) |
Variables | |
| static cl::opt< std::string > | FuncName ("cppfname", cl::desc("Specify the name of the generated function"), cl::value_desc("function name")) |
| static cl::opt< WhatToGenerate > | GenerationType ("cppgen", cl::Optional, cl::desc("Choose what kind of output to generate"), cl::init(GenProgram), cl::values(clEnumValN(GenProgram,"program","Generate a complete program"), clEnumValN(GenModule,"module","Generate a module definition"), clEnumValN(GenContents,"contents","Generate contents of a module"), clEnumValN(GenFunction,"function","Generate a function definition"), clEnumValN(GenFunctions,"functions","Generate all function definitions"), clEnumValN(GenInline,"inline","Generate an inline function"), clEnumValN(GenVariable,"variable","Generate a variable definition"), clEnumValN(GenType,"type","Generate a type definition"), clEnumValEnd)) |
| static cl::opt< std::string > | NameToGenerate ("cppfor", cl::Optional, cl::desc("Specify the name of the thing to generate"), cl::init("!bad!")) |
| static unsigned | indent_level = 0 |
| #define HANDLE_ATTR | ( | X | ) |
Value:
if (attrs & Attribute::X) \ Out << " | Attribute::" #X; \ attrs &= ~Attribute::X;
typedef std::map<const Value*,std::string> ForwardRefMap [static] |
Definition at line 87 of file CPPBackend.cpp.
typedef std::set<std::string> NameSet [static] |
Definition at line 84 of file CPPBackend.cpp.
Definition at line 81 of file CPPBackend.cpp.
Definition at line 82 of file CPPBackend.cpp.
Definition at line 85 of file CPPBackend.cpp.
Definition at line 83 of file CPPBackend.cpp.
Definition at line 86 of file CPPBackend.cpp.
| enum WhatToGenerate |
Definition at line 44 of file CPPBackend.cpp.
| const std::string* @1029::findTypeName | ( | const TypeSymbolTable & | ST, | |
| const Type * | Ty | |||
| ) | [inline, static] |
Definition at line 205 of file CPPBackend.cpp.
References llvm::TypeSymbolTable::begin(), and llvm::TypeSymbolTable::end().
| std::string @1029::getTypePrefix | ( | const Type * | Ty | ) | [inline, static] |
Definition at line 180 of file CPPBackend.cpp.
References llvm::Type::getTypeID(), and llvm::utostr().
| void @1029::in | ( | ) | [inline, static] |
| void LLVMInitializeCppBackendTarget | ( | ) |
| formatted_raw_ostream& @1029::nl | ( | formatted_raw_ostream & | Out, | |
| int | delta = 0 | |||
| ) | [inline, static] |
| void @1029::out | ( | ) | [inline, static] |
Definition at line 170 of file CPPBackend.cpp.
References indent_level.
Referenced by LLVMWriteBitcodeToFile(), and llvm::Archive::writeToDisk().
| void @1029::sanitize | ( | std::string & | str | ) | [inline, static] |
Definition at line 173 of file CPPBackend.cpp.
Definition at line 100 of file CPPBackend.cpp.
Definition at line 101 of file CPPBackend.cpp.
Definition at line 102 of file CPPBackend.cpp.
cl::opt<WhatToGenerate> GenerationType("cppgen", cl::Optional, cl::desc("Choose what kind of output to generate"), cl::init(GenProgram), cl::values(clEnumValN(GenProgram,"program","Generate a complete program"),clEnumValN(GenModule,"module","Generate a module definition"),clEnumValN(GenContents,"contents","Generate contents of a module"),clEnumValN(GenFunction,"function","Generate a function definition"),clEnumValN(GenFunctions,"functions","Generate all function definitions"),clEnumValN(GenInline,"inline","Generate an inline function"),clEnumValN(GenVariable,"variable","Generate a variable definition"),clEnumValN(GenType,"type","Generate a type definition"),clEnumValEnd)) [static] |
char ID [static] |
Definition at line 106 of file CPPBackend.cpp.
unsigned indent_level = 0 [static] |
Definition at line 103 of file CPPBackend.cpp.
cl::opt<std::string> NameToGenerate("cppfor", cl::Optional, cl::desc("Specify the name of the thing to generate"), cl::init("!bad!")) [static] |
Definition at line 92 of file CPPBackend.cpp.
Definition at line 93 of file CPPBackend.cpp.
Definition at line 95 of file CPPBackend.cpp.
Definition at line 98 of file CPPBackend.cpp.
| uint64_t uniqueNum |
Definition at line 94 of file CPPBackend.cpp.
Definition at line 97 of file CPPBackend.cpp.
Definition at line 99 of file CPPBackend.cpp.
Definition at line 96 of file CPPBackend.cpp.