42 #ifdef ISPC_HOST_IS_WINDOWS 61 #define PRINTF_FUNC __attribute__((format(printf, 2, 3))) 67 #ifdef ISPC_HOST_IS_WINDOWS 68 int vasprintf(
char **sptr,
const char *fmt, va_list argv);
69 int asprintf(
char **sptr,
const char *fmt, ...);
110 #define UNREACHABLE() FatalError(__FILE__, __LINE__, "unreachable code") 116 #define FATAL(message) FatalError(__FILE__, __LINE__, message) 122 [[noreturn]]
void FatalError(
const char *file,
int line,
const char *message);
128 #define Assert(expr) ((void)((expr) ? 0 : ((void)DoAssert(__FILE__, __LINE__, #expr), 0))) 135 void DoAssert(
const char *file,
int line,
const char *expr);
142 #define AssertPos(pos, expr) ((void)((expr) ? 0 : ((void)DoAssertPos(pos, __FILE__, __LINE__, #expr), 0))) 161 int StringEditDistance(
const std::string &str1,
const std::string &str2,
int maxDist);
169 std::vector<std::string>
MatchStrings(
const std::string &str,
const std::vector<std::string> &options);
174 void GetDirectoryAndFileName(
const std::string ¤tDir,
const std::string &relativeName, std::string *directory,
175 std::string *filename);
void PerformanceWarning(SourcePos p, const char *format,...) PRINTF_FUNC
void GetDirectoryAndFileName(const std::string ¤tDir, const std::string &relativeName, std::string *directory, std::string *filename)
void DoAssert(const char *file, int line, const char *expr)
int StringEditDistance(const std::string &str1, const std::string &str2, int maxDist)
void Error(SourcePos p, const char *format,...) PRINTF_FUNC
bool VerifyDataLayoutCompatibility(const std::string &module_dl, const std::string &lib_dl)
void PrintWithWordBreaks(const char *buf, int indent, int columnWidth, FILE *out)
uint32_t RoundUpPow2(uint32_t v)
Representation of a range of positions in a source file.
void Warning(SourcePos p, const char *format,...) PRINTF_FUNC
void DoAssertPos(SourcePos pos, const char *file, int line, const char *expr)
void FatalError(const char *file, int line, const char *message)
bool IsStdin(const char *)
std::vector< std::string > MatchStrings(const std::string &str, const std::vector< std::string > &options)
Main ispc.header file. Defines Target, Globals and Opt classes.
void Debug(SourcePos p, const char *format,...) PRINTF_FUNC