LLVM API Documentation

Defines | Enumerations | Functions | Variables
CPPBackend.cpp File Reference
#include "CPPTargetMachine.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/TargetRegistry.h"
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <map>
#include <set>
Include dependency graph for CPPBackend.cpp:

Go to the source code of this file.

Defines

#define HANDLE_ATTR(X)

Enumerations

enum  WhatToGenerate {
  GenProgram, GenModule, GenContents, GenFunction,
  GenFunctions, GenInline, GenVariable, GenType
}

Functions

void LLVMInitializeCppBackendTarget ()
static void sanitize (std::string &str)
static std::string getTypePrefix (Type *Ty)
static std::string ftostr (const APFloat &V)
static StringRef ConvertAtomicOrdering (AtomicOrdering Ordering)
static StringRef ConvertAtomicSynchScope (SynchronizationScope SynchScope)

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< WhatToGenerateGenerationType ("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!"))

Define Documentation

#define HANDLE_ATTR (   X)
Value:
if (attrs.contains(Attribute::X)) {                               \
        Out << "B.addAttribute(Attribute::" #X ");"; nl(Out);           \
        attrs.removeAttribute(Attribute::X);                            \
      }

Enumeration Type Documentation

Enumerator:
GenProgram 
GenModule 
GenContents 
GenFunction 
GenFunctions 
GenInline 
GenVariable 
GenType 

Definition at line 46 of file CPPBackend.cpp.


Function Documentation

static StringRef ConvertAtomicOrdering ( AtomicOrdering  Ordering) [static]
static StringRef ConvertAtomicSynchScope ( SynchronizationScope  SynchScope) [static]

Definition at line 1103 of file CPPBackend.cpp.

References llvm::CrossThread, llvm_unreachable, and llvm::SingleThread.

static std::string ftostr ( const APFloat V) [inline, static]
static std::string getTypePrefix ( Type Ty) [static]

Definition at line 77 of file CPPBackend.cpp.

References llvm::TheCppBackendTarget, and llvm::X.

static void sanitize ( std::string &  str) [inline, static]

Definition at line 175 of file CPPBackend.cpp.


Variable Documentation

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]