A couple of fixes for using Makefile.standalone on Mac.
(*) PNaCl toolchain_build builds 64-bit libraries for LLVM on Mac.
That won't link with subzero code if subzero is built with -m32,
so add an option to override the -m32.
(*) include locale header
(*) Mark xMacroIntegrityCheck unused to avoid clang compiler warning.
(*) virtual dtor, for inheritable class
(*) Mark compare function const
BUG=none
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/428733003
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 113ffc4..5dd8b63 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include <ctype.h> // isdigit(), isupper()
+#include <locale> // locale
#include "IceDefs.h"
#include "IceTypes.h"
@@ -61,7 +62,7 @@
private:
typedef std::pair<Type, KeyType> TupleType;
struct TupleCompare {
- bool operator()(const TupleType &A, const TupleType &B) {
+ bool operator()(const TupleType &A, const TupleType &B) const {
if (A.first != B.first)
return A.first < B.first;
if (KeyTypeHasFP)
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index 3f6098c..05ae121 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -198,4 +198,6 @@
return NULL;
}
+TargetGlobalInitLowering::~TargetGlobalInitLowering() {}
+
} // end of namespace Ice
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index c798943..da52adf 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -211,6 +211,8 @@
public:
static TargetGlobalInitLowering *createLowering(TargetArch Target,
GlobalContext *Ctx);
+ virtual ~TargetGlobalInitLowering();
+
// TODO: Allow relocations to be represented as part of the Data.
virtual void lower(const IceString &Name, SizeT Align, bool IsInternal,
bool IsConst, bool IsZeroInitializer, SizeT Size,
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 8123e74..7c60d08 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -143,7 +143,7 @@
// could get out of sync if enum values are reordered or if entries
// are added or deleted. This dummy function uses static_assert to
// ensure everything is kept in sync.
-void xMacroIntegrityCheck() {
+void __attribute__((unused)) xMacroIntegrityCheck() {
// Validate the enum values in FCMPX8632_TABLE.
{
// Define a temporary set of enum values based on low-level