[llvm-commits] [PATCH] Add better support for environment portion of triple
Duncan Sands
baldrick at free.fr
Wed Sep 15 01:56:39 PDT 2010
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.
More information about the llvm-commits
mailing list