Skip to content

Commit

Permalink
Fix build for older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-prantl committed Sep 4, 2021
1 parent 06c409d commit 399a8b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,8 @@ void IRGenDebugInfoImpl::emitVariableDeclaration(

// Get or create the DILocalVariable.
llvm::DILocalVariable *Var;
auto CachedVar = LocalVarCache.find({KeyScope, VarInfo.Name.data(), ArgNo});
VarID Key(KeyScope, VarInfo.Name.data(), ArgNo);
auto CachedVar = LocalVarCache.find(Key);
if (CachedVar != LocalVarCache.end()) {
Var = cast<llvm::DILocalVariable>(CachedVar->second);
} else {
Expand All @@ -2501,8 +2502,7 @@ void IRGenDebugInfoImpl::emitVariableDeclaration(
else
Var = DBuilder.createAutoVariable(VarScope, VarInfo.Name, Unit, DVarLine,
DITy, Preserve, Flags);
LocalVarCache.insert(
{{KeyScope, VarInfo.Name.data(), ArgNo}, llvm::TrackingMDNodeRef(Var)});
LocalVarCache.insert({Key, llvm::TrackingMDNodeRef(Var)});
}

auto appendDIExpression =
Expand Down

0 comments on commit 399a8b4

Please sign in to comment.