Ignore:
Timestamp:
May 11, 2018, 9:40:16 PM (11 months ago)
Author:
cameron
Message:

Eliminate dependency on llvm/CodeGen/CommandFlags.h

File:
1 edited

Legend:

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

    r5930 r6030  
    88#include <pablo/pablo_toolchain.h>
    99#include <UCD/UCD_Config.h>
    10 #include <llvm/CodeGen/CommandFlags.h>
     10#include <llvm/Support/CommandLine.h>
    1111#include <llvm/Support/raw_ostream.h>
    1212
     
    117117unsigned GroupNum;
    118118
    119 const llvm::Reloc::Model RelocModel = ::RelocModel;
    120 
    121 const llvm::CodeModel::Model CMModel = ::CMModel;
    122 
    123 const std::string MArch = ::MArch;
    124 
    125 const llvm::TargetMachine::CodeGenFileType FileType = ::FileType;
    126 
    127 TargetOptions Options;
     119TargetOptions target_Options;
    128120
    129121const cl::OptionCategory * LLVM_READONLY codegen_flags() {
     
    135127}
    136128
    137 std::string getCPUStr() {
    138     return ::getCPUStr();
    139 }
    140 
    141 std::string getFeaturesStr() {
    142     return ::getFeaturesStr();
    143 }
    144 
    145 void setFunctionAttributes(llvm::StringRef CPU, llvm::StringRef Features, llvm::Module &M) {
    146     return ::setFunctionAttributes(CPU, Features, M);
    147 }
    148129
    149130std::string ProgramName;
     
    163144    }
    164145    ObjectCacheDir = ObjectCacheDirOption.empty() ? nullptr : ObjectCacheDirOption.data();
    165     Options = InitTargetOptionsFromCodeGenFlags();
    166146#if LLVM_VERSION_INTEGER >= LLVM_VERSION_CODE(3, 7, 0)
    167     Options.MCOptions.AsmVerbose = true;
     147    target_Options.MCOptions.AsmVerbose = true;
    168148#endif
    169149    switch (OptLevelOption) {
Note: See TracChangeset for help on using the changeset viewer.