LLVMGetTargetFromTriple is part of the C API, but ultimately calls TargetRegistry::lookupTarget.
However, the error string from this function seems to assume that it's being used inside llc. As a result, callers of LLVMGetTargetFromTriple are forced to ignore the error string. This is unfortunate because the other values, e.g. "no targets are registered" is useful feedback.
I'm open to suggestions as to the best wording here.
(I've just used git blame to pick reviewers, do let me know if I've picked the wrong people.)
While I agree that it is a problem to refer to a command line option in the library, it totally does not make sense to refer to llc here. I'd rather remove the references to command line flags entirely.