[llvm-commits] [PATCH] Add better support for environment portion of triple
Cameron Esfahani
dirty at apple.com
Wed Sep 15 15:45:29 PDT 2010
Attached is a newer patch which resolves these issues.
I was able to add some level of testing to the TripleTest.cpp unittest, but until we define some environments, there are some holes in the coverage.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: environment.patch
Type: application/octet-stream
Size: 8447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100915/9613d00a/attachment.obj>
-------------- next part --------------
On Sep 15, 2010, at 1:56 AM, Duncan Sands wrote:
> Hi Cameron,
>
>> + explicit Triple(StringRef ArchStr, StringRef VendorStr, StringRef OSStr,
>> + StringRef EnvironmentStr )
>
> there is an extraneous space before the closing bracket.
>
>> + /// getEnvironment - Get the parsed environment type of this triple.
>> + EnvironmentType getEnvironment() const {
>> + if (!isInitialized()) Parse();
>> + if (!hasEnvironment()) return UnknownEnvironment;
>
> If there is no environment, won't Environment be equal to UnknownEnvironment,
> making the above line useless?
>
>> + return Environment;
>> + }
>> +
>
> As well as the above, you should also add some unit tests and enhance the
> normalize method to take the environment into account.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Cameron Esfahani
dirty at apple.com
"Americans are very skilled at creating a custom meaning from something that's mass-produced."
Ann Powers
More information about the llvm-commits
mailing list