Add test that getArchTypeForLLVMName() returns something other than Unknown for all but 1 special case.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
For context, this test would have prevented the bug that I fixed in http://reviews.llvm.org/D9436 ("Add 'sparcel' in one more place")
Comment Actions
Please use the LLVM naming conventions for variables. Please use a range based for loop. I would prefer EXPECT_NE here rather than ASSERT_NE.
Comment Actions
To use a range-based for loop requires an artificial object as the head of the registry because begin() and end() are static methods.
Something like this:
llvm::TargetRegistry RegistryRoot; for (const auto& Target : RegistryRoot ) {
Do you prefer that and/or should I change the other (6 ish) places where the explicit loop appears?