Current implementation looks confusing. It looks like it should
report/print something on error, but it does not do that.
HandleExpectedError used to check targets created from triple.
I am not sure what was intended behavior,
current one - it does not print anything if target was not created and assumes
that test pass.
That behavior looks correct for me though, but then implementation can be simplified,
like this patch do. I think current behavior is correct because of next:
I tried to configure LLVM with -DLLVM_TARGETS_TO_BUILD=ARM and debugged the testcase under
windows. Triple I had was "i386-pc-windows-msvc". Testcase uses getHostTripleForAddrSize() to get
target triple. As expected for my configuration no tests were executed. For me it is looks fine in that case.
I recently added some functions to llvm that server this purpose better. I would suggest just deleting this function, and adding this: