[llvm-commits] [llvm] r123990 - in /llvm/trunk: include/llvm/ADT/Triple.h lib/Support/Triple.cpp unittests/ADT/TripleTest.cpp

Duncan Sands baldrick at free.fr
Sun Jan 23 05:26:42 PST 2011


Hi Renato,

>>   >>  @@ -84,6 +84,7 @@
>>   >>
>>   >>  case Apple: return "apple";
>>   >>  case PC: return "pc";
>>   >>  + case NoVendor: return "none";
>>
>> PS: Presumably you intend to have LLVM codegen behave differently if it
>> sees NoOS or NoVendor, as opposed to UnknownOs or UnknownVendor? If not,
>> then there should be no need to add these.
>
> Yes. It's very natural NOT to have an OS in ARM world, so that's a valid
> option. UnknownOS/Vendor is an invalid triple.

LLVM has no notion of a valid/invalid triple.  All it cares about is recognizing
the information it makes use of, like the arch or the O/S.  Is LLVM (I'm not
talking about clang here) going to make different codegen or optimization
decisions based on whether the O/S is "unknown" or "none"?  If not, then there
is no need to have the Triple class recognize "none".  Maybe clang has other
needs but if so I think it should build its own infrastructure (perhaps on top
of the Triple logic) to take care of this.

Ciao, Duncan.



More information about the llvm-commits mailing list