8077364: "if( !this )" construct prevents build on Xcode 6.3
authorsla
Wed, 15 Apr 2015 09:34:46 +0200
changeset 30239 dc83236ebb28
parent 30238 4cb81d03d19f
child 30240 a7ba42fa1df6
8077364: "if( !this )" construct prevents build on Xcode 6.3 Reviewed-by: stefank, simonis
hotspot/make/bsd/makefiles/gcc.make
hotspot/src/share/vm/adlc/formssel.cpp
hotspot/src/share/vm/libadt/set.cpp
hotspot/src/share/vm/opto/chaitin.cpp
--- a/hotspot/make/bsd/makefiles/gcc.make	Mon Apr 13 23:04:02 2015 -0700
+++ b/hotspot/make/bsd/makefiles/gcc.make	Wed Apr 15 09:34:46 2015 +0200
@@ -313,22 +313,13 @@
 
 # Work around some compiler bugs.
 ifeq ($(USE_CLANG), true)
-  # Clang 4.2
-  ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
-    OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
-    OPT_CFLAGS/unsafe.o += -O1
-  # Clang 5.0
-  else ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 0), 1)
+  # Clang <= 6.1
+  ifeq ($(shell expr \
+      $(CC_VER_MAJOR) \< 6 \| \
+      \( $(CC_VER_MAJOR) = 6 \& $(CC_VER_MINOR) \<= 1 \) \
+    ), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
     OPT_CFLAGS/unsafe.o += -O1
-  # Clang 5.1
-  else ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 1), 1)
-    OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
-    OPT_CFLAGS/unsafe.o += -O1
-  # Clang 6.0 
-  else ifeq ($(shell expr $(CC_VER_MAJOR) = 6 \& $(CC_VER_MINOR) = 0), 1) 
-    OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT) 
-    OPT_CFLAGS/unsafe.o += -O1 
   else
     $(error "Update compiler workarounds for Clang $(CC_VER_MAJOR).$(CC_VER_MINOR)")
   endif
@@ -336,7 +327,7 @@
   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
     OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
-  endif
+  endif 
 endif
 
 # Flags for generating make dependency flags.
--- a/hotspot/src/share/vm/adlc/formssel.cpp	Mon Apr 13 23:04:02 2015 -0700
+++ b/hotspot/src/share/vm/adlc/formssel.cpp	Wed Apr 15 09:34:46 2015 +0200
@@ -3392,7 +3392,7 @@
 // Count occurrences of operands names in the leaves of the instruction
 // match rule.
 void MatchNode::count_instr_names( Dict &names ) {
-  if( !this ) return;
+  if( this == NULL ) return;
   if( _lChild ) _lChild->count_instr_names(names);
   if( _rChild ) _rChild->count_instr_names(names);
   if( !_lChild && !_rChild ) {
--- a/hotspot/src/share/vm/libadt/set.cpp	Mon Apr 13 23:04:02 2015 -0700
+++ b/hotspot/src/share/vm/libadt/set.cpp	Wed Apr 15 09:34:46 2015 +0200
@@ -57,7 +57,7 @@
 // The caller must deallocate the string.
 char *Set::setstr() const
 {
-  if( !this ) return os::strdup("{no set}");
+  if( this == NULL ) return os::strdup("{no set}");
   Set &set = clone();           // Virtually copy the basic set.
   set.Sort();                   // Sort elements for in-order retrieval
 
--- a/hotspot/src/share/vm/opto/chaitin.cpp	Mon Apr 13 23:04:02 2015 -0700
+++ b/hotspot/src/share/vm/opto/chaitin.cpp	Wed Apr 15 09:34:46 2015 +0200
@@ -2095,7 +2095,7 @@
 // Dump a register name into a buffer.  Be intelligent if we get called
 // before allocation is complete.
 char *PhaseChaitin::dump_register( const Node *n, char *buf  ) const {
-  if( !this ) {                 // Not got anything?
+  if( this == NULL ) {          // Not got anything?
     sprintf(buf,"N%d",n->_idx); // Then use Node index
   } else if( _node_regs ) {
     // Post allocation, use direct mappings, no LRG info available