Ignore:
Timestamp:
Aug 21, 2017, 11:57:06 AM (21 months ago)
Author:
nmedfort
Message:

Bug fixes for IR/ASM writing

File:
1 edited

Legend:

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

    r5521 r5616  
    3131                        clEnumValEnd), cl::cat(CodeGenOptions));
    3232
    33 static cl::opt<const char *> IROutputFilenameOption("dump-generated-IR-output", cl::init(nullptr),
     33static cl::opt<std::string> IROutputFilenameOption("dump-generated-IR-output", cl::init(""),
    3434                                                       cl::desc("output IR filename"), cl::cat(CodeGenOptions));
    3535
    3636#ifndef USE_LLVM_3_6
    37 static cl::opt<const char *> ASMOutputFilenameOption("asm-output", cl::init(nullptr),
     37static cl::opt<std::string> ASMOutputFilenameOption("asm-output", cl::init(""),
    3838                                                    cl::desc("output ASM filename"), cl::cat(CodeGenOptions));
    3939
     
    4949                                                   cl::desc("Enable object caching"), cl::cat(CodeGenOptions));
    5050
    51 static cl::opt<const char *> ObjectCacheDirOption("object-cache-dir", cl::init(nullptr),
     51static cl::opt<std::string> ObjectCacheDirOption("object-cache-dir", cl::init(""),
    5252                                                 cl::desc("Path to the object cache diretory"), cl::cat(CodeGenOptions));
    5353
     
    173173        EnableObjectCache = false;
    174174    }
    175 
    176     ObjectCacheDir = ObjectCacheDirOption;
    177     IROutputFilename = IROutputFilenameOption;
    178     ObjectCacheDir = ObjectCacheDirOption;
     175    ObjectCacheDir = ObjectCacheDirOption.empty() ? nullptr : ObjectCacheDirOption.data();
     176    IROutputFilename = IROutputFilenameOption.empty() ? nullptr : IROutputFilenameOption.data();
     177    ASMOutputFilename = ASMOutputFilenameOption.empty() ? nullptr : ASMOutputFilenameOption.data();
    179178    Options = InitTargetOptionsFromCodeGenFlags();
    180179    #ifndef USE_LLVM_3_6
Note: See TracChangeset for help on using the changeset viewer.