Running "llc -march=cpp foo.ll" where foo contains metadata (e.g., debug metadata produced by "clang -g -O0 -S -emit-llvm foo.c -o foo.ll") results in "LLVM ERROR: Invalid primitive type". That error message comes from the fact that the metadata type is missing from a switch statement in CPPBackend.cpp, but just adding the "case Metadata" is not sufficient, as the metadata producing c++ api is still not emitted.
Extended Description
Running "llc -march=cpp foo.ll" where foo contains metadata (e.g., debug metadata produced by "clang -g -O0 -S -emit-llvm foo.c -o foo.ll") results in "LLVM ERROR: Invalid primitive type". That error message comes from the fact that the metadata type is missing from a switch statement in CPPBackend.cpp, but just adding the "case Metadata" is not sufficient, as the metadata producing c++ api is still not emitted.
Here's my test program:
float foo( float x ) { return x * x; }
int frab;