diff --git a/Makefile b/Makefile index 47b1da4c..b03fc05e 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ will do all the work for you. Do the following: \n 2. Set ISPC_HOME variable to your ISPC location (probably current folder). 3. Run alloy.py tool to checkout and build LLVM: \n alloy.py -b --version=3.4 \n -4. Add $LLVM_HOME/bin-3.4/bin path to your PATH. \n +4. Add $$LLVM_HOME/bin-3.4/bin path to your PATH. \n ============================================================================== endef @@ -114,7 +114,7 @@ ifeq ($(LLVM_VERSION),LLVM_3_4) endif ifeq ($(LLVM_VERSION),LLVM_3_5) - ISPC_LIBS += -lcurses + ISPC_LIBS += -lcurses -lz endif ifeq ($(ARCH_OS),Linux) diff --git a/cbackend.cpp b/cbackend.cpp index cb56cb82..33906778 100644 --- a/cbackend.cpp +++ b/cbackend.cpp @@ -1769,7 +1769,11 @@ std::string CWriter::GetValueName(const llvm::Value *Operand) { // Resolve potential alias. if (const llvm::GlobalAlias *GA = llvm::dyn_cast(Operand)) { +#if defined(LLVM_3_5) + if (const llvm::Value *V = GA->getAliasedGlobal()) +#else if (const llvm::Value *V = GA->resolveAliasedGlobal(false)) +#endif Operand = V; }