Changeset 4669


Ignore:
Timestamp:
Jul 14, 2015, 11:41:27 AM (4 years ago)
Author:
nmedfort
Message:

UCD Generator bug fix for LLVM 3.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/generate_predefined_ucd_functions.cpp

    r4668 r4669  
    157157    std::string msg;
    158158    const Target * TheTarget = TargetRegistry::lookupTarget(TheTriple.getTriple(), msg);
    159 
    160159    if (TheTarget == nullptr) {
    161160        throw std::runtime_error(msg);
     
    176175    #ifdef USE_LLVM_3_5
    177176    std::string error;
    178     std::unique_ptr<tool_output_file> Out = make_unique<tool_output_file>(OutputFilename.c_str(), error, sys::fs::F_None);
     177    std::unique_ptr<tool_output_file> Out = make_unique<tool_output_file>(ObjectFilename.c_str(), error, sys::fs::F_None);
    179178    if (!error.empty()) {
    180179        throw std::runtime_error(error);
     
    192191
    193192    // Add an appropriate TargetLibraryInfo pass for the module's triple.
    194     TargetLibraryInfo * TLI = new TargetLibraryInfo(TheTriple);
    195 
    196     PM.add(TLI);
     193    PM.add(new TargetLibraryInfo(TheTriple));
    197194
    198195    // Add the target data from the target machine, if it exists, or the module.
     
    205202        module->setDataLayout(DL);
    206203    }
     204    #ifdef USE_LLVM_3_5
     205    PM.add(new DataLayoutPass(module));
     206    #else
    207207    PM.add(new DataLayoutPass());
     208    #endif
    208209    PM.add(createReassociatePass());
    209210    PM.add(createInstructionCombiningPass());
Note: See TracChangeset for help on using the changeset viewer.