Provide ISPC_POINTER_SIZE predefined maacro (32 or 64)

This commit is contained in:
Matt Pharr
2011-12-09 16:37:42 -08:00
parent 20f34b67da
commit d2fa735ef1
2 changed files with 8 additions and 0 deletions

View File

@@ -1176,6 +1176,11 @@ Module::execPreprocessor(const char* infilename, llvm::raw_string_ostream* ostre
FATAL("Unhandled target ISA in preprocessor symbol definition");
}
if (g->target.is32Bit)
opts.addMacroDef("ISPC_POINTER_SIZE=32");
else
opts.addMacroDef("ISPC_POINTER_SIZE=64");
opts.addMacroDef("ISPC_MAJOR_VERSION=1");
opts.addMacroDef("ISPC_MINOR_VERSION=1");