diff options
author | Davide Italiano <davidino@fb.com> | 2024-01-16 16:56:24 -0800 |
---|---|---|
committer | Davide Italiano <davidino@fb.com> | 2024-01-16 17:01:01 -0800 |
commit | b6f922fbf5e983122271aa12acb33f6172046d4d (patch) | |
tree | a09e77e1349eabc624db86005386de27eb1d5a9a /llvm/lib/IR/DebugInfo.cpp | |
parent | c3f96acb41ef20a1f84715b1b6fb39e916f9aac8 (diff) | |
download | llvm-b6f922fbf5e983122271aa12acb33f6172046d4d.zip llvm-b6f922fbf5e983122271aa12acb33f6172046d4d.tar.gz llvm-b6f922fbf5e983122271aa12acb33f6172046d4d.tar.bz2 |
Revert "[CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (#75385)"
This reverts commit fc6faa1113e9069f41b5500db051210af0eea843.
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 6b7dd74..b9ab6f8 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -223,7 +223,7 @@ void DebugInfoFinder::processCompileUnit(DICompileUnit *CU) { void DebugInfoFinder::processInstruction(const Module &M, const Instruction &I) { if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I)) - processVariable(DVI->getVariable()); + processVariable(M, DVI->getVariable()); if (auto DbgLoc = I.getDebugLoc()) processLocation(M, DbgLoc.get()); @@ -240,7 +240,7 @@ void DebugInfoFinder::processLocation(const Module &M, const DILocation *Loc) { } void DebugInfoFinder::processDPValue(const Module &M, const DPValue &DPV) { - processVariable(DPV.getVariable()); + processVariable(M, DPV.getVariable()); processLocation(M, DPV.getDebugLoc().get()); } @@ -315,18 +315,12 @@ void DebugInfoFinder::processSubprogram(DISubprogram *SP) { processType(TVal->getType()); } } - - for (auto *N : SP->getRetainedNodes()) { - if (auto *Var = dyn_cast_or_null<DILocalVariable>(N)) { - processVariable(Var); - } - } } -void DebugInfoFinder::processVariable(DILocalVariable *DV) { +void DebugInfoFinder::processVariable(const Module &M, + const DILocalVariable *DV) { if (!NodesSeen.insert(DV).second) return; - LVs.push_back(DV); processScope(DV->getScope()); processType(DV->getType()); } |