From b7ae3ccb8474eefbb2855762efd3c236e7a9ae22 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 18 Feb 2011 22:43:42 +0000 Subject: Do not lose debug info of an inlined function argument even if the argument is only used through GEPs. This time with a fix that avoids using invalidated DenseMap iterator. llvm-svn: 125984 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index def0c69f229..49c862ce3e0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -87,6 +87,9 @@ class SelectionDAGLegalize { // If someone requests legalization of the new node, return itself. if (From != To) LegalizedNodes.insert(std::make_pair(To, To)); + + // Transfer SDDbgValues. + DAG.TransferDbgValues(From, To); } public: -- cgit v1.2.3