[llvm-commits] [PATCH] Add better support for environment portion of triple
Cameron Esfahani
dirty at apple.com
Wed Sep 15 14:08:45 PDT 2010
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.
>
Yes
>> + /// 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?
>
Fixed
>> + 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.
>
I'm not sure how to write a test to test this functionality. Any suggestions?
> 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
"You only live once, and the way I live, once is enough"
Frank Sinatra
More information about the llvm-commits
mailing list