8077364: "if( !this )" construct prevents build on Xcode 6.3

Reviewed-by: stefank, simonis
This commit is contained in:
Staffan Larsen 2015-04-15 09:34:46 +02:00
parent f93a647092
commit 47d774ab34
4 changed files with 9 additions and 18 deletions
hotspot
make/bsd/makefiles
src/share/vm

@ -313,22 +313,13 @@ endif
# Work around some compiler bugs.
ifeq ($(USE_CLANG), true)
# Clang 4.2
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 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.0
else ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 0), 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 @@ else
# 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.

@ -3392,7 +3392,7 @@ const char *MatchNode::reduce_left(FormDict &globals) const {
// 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 ) {

@ -57,7 +57,7 @@ const CoSet *Set::asCoSet() const { assert(0); return NULL; }
// 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

@ -2095,7 +2095,7 @@ static char *print_reg( OptoReg::Name reg, const PhaseChaitin *pc, char *buf ) {
// 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