[PATCH] Support: split object format out of environment
Saleem Abdulrasool
abdulras at fb.com
Wed Mar 5 10:54:10 PST 2014
================
Comment at: include/llvm/ADT/Triple.h:153
@@ +152,3 @@
+ /// The object format type.
+ ObjectFormatType Format;
+
----------------
Tim Northover wrote:
> This field needs initializing in the constructor and could probably do with a getFormat/setFormat pair so it's like the others.
Done
================
Comment at: include/llvm/ADT/Triple.h:355
@@ -346,3 +354,3 @@
bool isOSBinFormatELF() const {
- return !isOSBinFormatMachO() && !isOSBinFormatCOFF();
+ return Format == Triple::ELF;
}
----------------
Tim Northover wrote:
> This should use the getFormat() method to fit in with other Triple queries.
Done
================
Comment at: unittests/ADT/TripleTest.cpp:204
@@ -203,3 +203,3 @@
- for (int Env = 1+Triple::UnknownEnvironment; Env <= Triple::MachO;
+ for (int Env = 1 + Triple::UnknownEnvironment; Env <= Triple::Android;
++Env) {
----------------
Tim Northover wrote:
> I think the unittests need more updating than this to check the format field properly.
Done
http://llvm-reviews.chandlerc.com/D2946
More information about the llvm-commits
mailing list