[PATCH] 8975 - llc should warn about invalid target triple

I changed Module::setTargetTriple to return true/false when an
invalid/valid triple is passed as parameter.

The validation is made using the ADT/Triple.cpp

Last I modified LLParser::ParseTargetDefinition() to check if the
return of setTargetTriple warns about an invalid triple.

John.

8975.diff (2.3 KB)

Hi César,

I changed Module::setTargetTriple to return true/false when an
invalid/valid triple is passed as parameter.

target triples with unknown vendor and other fields occur all the time.
That's fine as long as you don't need those fields. What I am saying is
that a boolean value "valid" or "not valid" isn't very useful in my opinion.

Ciao, Duncan.

Hi Duncan, thank you for your comments.

I understand, in fact I was thinking the same thing but decided give
it a try - was worth the experience. I'll try another one.

César.