Fix problem with building ISPC by clang 3.4
This commit is contained in:
2
Makefile
2
Makefile
@@ -115,7 +115,7 @@ CXXFLAGS=$(OPT) $(LLVM_CXXFLAGS) -I. -Iobjs/ -I$(CLANG_INCLUDE) \
|
|||||||
$(LLVM_VERSION_DEF) \
|
$(LLVM_VERSION_DEF) \
|
||||||
-Wall \
|
-Wall \
|
||||||
-DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_VERSION="\"$(BUILD_VERSION)\"" \
|
-DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_VERSION="\"$(BUILD_VERSION)\"" \
|
||||||
-Wno-sign-compare
|
-Wno-sign-compare -Wno-unused-function
|
||||||
ifneq ($(LLVM_VERSION),LLVM_3_1)
|
ifneq ($(LLVM_VERSION),LLVM_3_1)
|
||||||
CXXFLAGS+=-Werror
|
CXXFLAGS+=-Werror
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -3066,7 +3066,7 @@ void CWriter::visitReturnInst(llvm::ReturnInst &I) {
|
|||||||
// Don't output a void return if this is the last basic block in the function
|
// Don't output a void return if this is the last basic block in the function
|
||||||
if (I.getNumOperands() == 0 &&
|
if (I.getNumOperands() == 0 &&
|
||||||
&*--I.getParent()->getParent()->end() == I.getParent() &&
|
&*--I.getParent()->getParent()->end() == I.getParent() &&
|
||||||
!I.getParent()->size() == 1) {
|
(!I.getParent()->size()) == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user