Unfortunately we can not, because user-defined datatypes are
syntactically different from builtin datatypes in MPICH. MPI_INT is a
macro, so what Clang sees is essentially a magic number. With
user-defined datatypes there's an identifier (MyEnumDatatype) that
actually shows up in the AST. There's a separate quirk in Clang for
handling these magic numbers and corresponding 'static const'
variables (not needed for OpenMPI, btw).
> so that the symbols are guaranteed to only show up once inA smart enough compiler (and Clang is smart enough) will eliminate
> executables (rather than once per compilation unit)?
those even at -O0.