43 #include <llvm/IR/DebugInfo.h> 46 class raw_string_ostream;
55 Module(
const char *filename);
63 void AddTypeDef(
const std::string &name,
const Type *type,
SourcePos pos);
68 void AddGlobalVariable(
const std::string &name,
const Type *type,
Expr *initExpr,
bool isConst,
78 void AddFunctionDefinition(
const std::string &name,
const FunctionType *ftype,
Stmt *code);
82 void AddExportedTypes(
const std::vector<std::pair<const Type *, SourcePos>> &types);
103 GenerateFlatDeps = 0x2,
104 GenerateMakeRuleForDeps = 0x4,
105 OutputDepsToStdout = 0x8,
138 static int CompileAndOutput(
const char *srcFile,
Arch arch,
const char *cpu, std::vector<ISPCTarget> targets,
140 const char *headerFileName,
const char *includeFileName,
const char *depsFileName,
141 const char *depsTargetName,
const char *hostStubFileName,
const char *devStubFileName);
168 bool writeOutput(
OutputType ot,
OutputFlags flags,
const char *filename,
const char *includeFileName = NULL,
170 bool writeHeader(
const char *filename);
172 bool writeDeps(
const char *filename,
bool generateMakeRule,
const char *targetName = NULL,
173 const char *srcFilename = NULL);
174 bool writeDevStub(
const char *filename);
175 bool writeHostStub(
const char *filename);
176 bool writeObjectFileOrAssembly(
OutputType outputType,
const char *filename);
177 static bool writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine, llvm::Module *module,
178 OutputType outputType,
const char *outFileName);
179 static bool writeBitcode(llvm::Module *module,
const char *outFileName,
OutputType outputType);
181 void execPreprocessor(
const char *infilename, llvm::raw_string_ostream *ostream)
const;
std::vector< std::pair< const Type *, SourcePos > > exportedTypes
Interface class for statements in the ispc language.
Symbol table that holds all known symbols during parsing and compilation.
Module::OutputFlags & operator &=(Module::OutputFlags &lhs, const __underlying_type(Module::OutputFlags) rhs)
Representation of a range of positions in a source file.
Module::OutputFlags & operator|=(Module::OutputFlags &lhs, const __underlying_type(Module::OutputFlags) rhs)
Type representing a function (return type + argument types)
Interface class that defines the type abstraction.
llvm::DICompileUnit * diCompileUnit
Expr is the abstract base class that defines the interface that all expression types must implement...
Module::OutputFlags operator|(const Module::OutputFlags lhs, const Module::OutputFlags rhs)
llvm::DIBuilder * diBuilder
Main ispc.header file. Defines Target, Globals and Opt classes.
SymbolTable * symbolTable