summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DwarfLinker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/DwarfLinker.cpp')
-rw-r--r--llvm/tools/dsymutil/DwarfLinker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index fcbc2680180..f9328e42fd0 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -3325,8 +3325,10 @@ void DwarfLinker::loadClangModule(StringRef Filename, StringRef ModulePath,
auto DwarfContext = DWARFContext::create(*ErrOrObj);
RelocationManager RelocMgr(*this);
for (const auto &CU : DwarfContext->compile_units()) {
- auto CUDie = CU->getUnitDIE(false);
+ maybeUpdateMaxDwarfVersion(CU->getVersion());
+
// Recursively get all modules imported by this one.
+ auto CUDie = CU->getUnitDIE(false);
if (!registerModuleReference(CUDie, *CU, ModuleMap, Indent)) {
if (Unit) {
errs() << Filename << ": Clang modules are expected to have exactly"
OpenPOWER on IntegriCloud