> There are a limited number of clang tests that check generated > assembly in test/CodeGen, if you want to go that path, but it > needs something like "// REQUIRES: arm-registered-target". > Testing generated assembly from clang is generally discouraged, > though, for better or worse.
OK -- re-committed as r200385, with the test in test/CodeGen and with the "REQUIRES:" line. > You could also do a purely semantic test like (untested): > > // test/Sema/arm-cortex-cpus.c > // RUN: %clang_cc1 -target arm-linux-gnueabi -mcpu=cortex-m4 -verify > // expected-no-diagnostics > #ifndef __ARM_ARCH_EXT_IDIV__ > # error "hwdiv wasn't set for cortex-m4!" > #endif Such a test already existed (in test/Preprocessor/arm-target-features.c), but the predefine is controlled by the target feature "hwdiv" rather than "hwdiv-arm" -- which is why the problem went unnoticed for a long time... Thanks a lot for your help Reid _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
