LLVM API Documentation
#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>
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< 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!")) |
#define HANDLE_ATTR | ( | X | ) |
if (attrs.contains(Attribute::X)) { \ Out << "B.addAttribute(Attribute::" #X ");"; nl(Out); \ attrs.removeAttribute(Attribute::X); \ }
enum WhatToGenerate |
Definition at line 46 of file CPPBackend.cpp.
static StringRef ConvertAtomicOrdering | ( | AtomicOrdering | Ordering | ) | [static] |
Definition at line 1090 of file CPPBackend.cpp.
References llvm::Acquire, llvm::AcquireRelease, llvm_unreachable, llvm::Monotonic, llvm::NotAtomic, llvm::Release, llvm::SequentiallyConsistent, and llvm::Unordered.
static StringRef ConvertAtomicSynchScope | ( | SynchronizationScope | SynchScope | ) | [static] |
Definition at line 1103 of file CPPBackend.cpp.
References llvm::CrossThread, llvm_unreachable, and llvm::SingleThread.
Definition at line 202 of file CPPBackend.cpp.
References llvm::APFloat::convertToDouble(), llvm::APFloat::convertToFloat(), llvm::APFloat::getSemantics(), llvm::APFloat::IEEEdouble, and llvm::APFloat::IEEEsingle.
static std::string getTypePrefix | ( | Type * | Ty | ) | [static] |
Definition at line 181 of file CPPBackend.cpp.
References llvm::Type::ArrayTyID, llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::FunctionTyID, getBitWidth(), llvm::Type::getTypeID(), llvm::Type::IntegerTyID, llvm::Type::LabelTyID, llvm::Type::PointerTyID, llvm::Type::StructTyID, llvm::utostr(), llvm::Type::VectorTyID, and llvm::Type::VoidTyID.
void LLVMInitializeCppBackendTarget | ( | ) |
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.
cl::opt<std::string> FuncName("cppfname", cl::desc("Specify the name of the generated function"), cl::value_desc("function name")) [static] |
Referenced by llvm::AMDGPUTargetLowering::LowerCall().
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] |