Ignore:
Timestamp:
Nov 11, 2017, 6:12:46 PM (18 months ago)
Author:
cameron
Message:

More changes in preparation for LLVM 3.9, 4.0

Location:
icGREP/icgrep-devel/icgrep/toolchain
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.cpp

    r5731 r5732  
     1#include "toolchain.h"
    12#include "object_cache.h"
    23#include <kernels/kernel.h>
     
    1415#include <boost/range/iterator_range.hpp>
    1516#include <boost/container/flat_set.hpp>
     17#if LLVM_VERSION_INTEGER < LLVM_4_0_0
    1618#include <llvm/Bitcode/ReaderWriter.h>
     19#else
     20#include <llvm/Bitcode/BitcodeReader.h>
     21#include <llvm/Bitcode/BitcodeWriter.h>
     22#endif
    1723#include <llvm/IR/Verifier.h>
    1824#include <ctime>
     
    113119                //MemoryBuffer * kb = kernelBuffer.get().release();
    114120                //auto loadedFile = parseBitcodeFile(kb->getMemBufferRef(), mContext);
     121#if LLVM_VERSION_INTEGER < LLVM_4_0_0
    115122                auto loadedFile = getLazyBitcodeModule(std::move(kernelBuffer.get()), idb->getContext());
     123#else
     124                auto loadedFile = getOwningLazyBitcodeModule(std::move(kernelBuffer.get()), idb->getContext());
     125#endif
    116126                if (*loadedFile) {
    117127                    Module * const m = loadedFile.get().release(); assert (m);
  • icGREP/icgrep-devel/icgrep/toolchain/toolchain.cpp

    r5731 r5732  
    66
    77#include <toolchain/toolchain.h>
    8 
    98#include <UCD/UCD_Config.h>
    109#include <llvm/CodeGen/CommandFlags.h>
     
    3433                        clEnumVal(TraceDynamicBuffers, "Show dynamic buffer allocations and deallocations."),
    3534                        clEnumVal(EnableAsserts, "Enable built-in Parabix framework asserts in generated IR."),
    36                         clEnumVal(EnableCycleCounter, "Count and report CPU cycles per kernel."),
    37                         clEnumValEnd), cl::cat(CodeGenOptions));
     35                        clEnumVal(EnableCycleCounter, "Count and report CPU cycles per kernel.")
     36                        CL_ENUM_VAL_SENTINEL), cl::cat(CodeGenOptions));
    3837
    3938static cl::opt<std::string> IROutputFilenameOption("dump-generated-IR-output", cl::init(""),
  • icGREP/icgrep-devel/icgrep/toolchain/toolchain.h

    r5731 r5732  
    2121#define LLVM_5_0_0 50000
    2222
     23// From LLVM 4.0.0 the clEnumValEnd sentinel is no longer needed.
     24// We define a macro to adapt to the CommandLine syntax based on LLVM version.
     25#if LLVM_VERSION_INTEGER < LLVM_4_0_0
     26#define CL_ENUM_VAL_SENTINEL , clEnumValEnd
     27#else
     28#define CL_ENUM_VAL_SENTINEL
     29#endif
    2330
    2431// FIXME: llvm/CodeGen/CommandFlags.h can only be included once or the various cl::opt causes multiple definition
Note: See TracChangeset for help on using the changeset viewer.