diff options
-rw-r--r-- | lld/COFF/InputFiles.cpp | 1 | ||||
-rw-r--r-- | lld/ELF/LTO.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp index c167ceb9c57..c4d7028e419 100644 --- a/lld/COFF/InputFiles.cpp +++ b/lld/COFF/InputFiles.cpp @@ -321,6 +321,7 @@ void BitcodeFile::parse() { // 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"); diff --git a/lld/ELF/LTO.h b/lld/ELF/LTO.h index 8f74fb72ade..c06c49e8324 100644 --- a/lld/ELF/LTO.h +++ b/lld/ELF/LTO.h @@ -40,7 +40,9 @@ public: 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(); |