César
2012-Jun-06 23:30 UTC
[LLVMdev] [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. -------------- next part -------------- A non-text attachment was scrubbed... Name: 8975.diff Type: application/octet-stream Size: 2355 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120606/8dd1d0d5/attachment.obj>
Duncan Sands
2012-Jun-07 08:48 UTC
[LLVMdev] [PATCH] 8975 - llc should warn about invalid target triple
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.> > 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. > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
César
2012-Jun-07 16:54 UTC
[LLVMdev] [PATCH] 8975 - llc should warn about invalid target triple
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. 2012/6/7 Duncan Sands <baldrick at free.fr>:> 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. > >> >> 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. >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev