Make sure lld enables ODR type uniquing for debug info when invoking
LTO, as a follow-up to LLVM r266549.
llvm-svn: 266555
// Usually parse() is thread-safe, but bitcode file is an exception.
std::lock_guard<std::mutex> Lock(Mu);
+ Context.ensureDITypeMap();
ErrorOr<std::unique_ptr<LTOModule>> ModOrErr = LTOModule::createFromBuffer(
Context, MB.getBufferStart(), MB.getBufferSize(), llvm::TargetOptions());
error(ModOrErr, "Could not create lto module");
std::vector<std::unique_ptr<InputFile>> compile();
BitcodeCompiler()
- : Combined(new llvm::Module("ld-temp.o", Context)), Mover(*Combined) {}
+ : Combined(new llvm::Module("ld-temp.o", Context)), Mover(*Combined) {
+ Context.ensureDITypeMap();
+ }
private:
std::vector<std::unique_ptr<InputFile>> runSplitCodegen();