Skip to content

Commit c368999

Browse files
[DebugInfo]: Remove dangerous dead function (-Wreturn-stack-address)
Signed-off-by: Itay Bookstein <[email protected]>
1 parent 486117d commit c368999

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,6 @@ class DwarfCompileUnit final : public DwarfUnit {
178178

179179
std::vector<BaseTypeRef> ExprRefedBaseTypes;
180180

181-
private:
182-
DenseMap<DIGlobalVariable *, SmallVector<GlobalExpr, 1>> *globalVarMap;
183-
public:
184-
void setGlobalVarMap(
185-
DenseMap<DIGlobalVariable *, SmallVector<GlobalExpr, 1>> *p = nullptr) {
186-
globalVarMap = p;
187-
}
188-
189181
/// Get or create global variable DIE.
190182
DIE *
191183
getOrCreateGlobalVariableDIE(const DIGlobalVariable *GV,

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,17 +1209,11 @@ void DwarfDebug::beginModule(Module *M) {
12091209
}
12101210

12111211
DenseSet<DIGlobalVariable *> Processed;
1212-
#if 0
1213-
CU.setGlobalVarMap(&GVMap);
1214-
#endif
12151212
for (auto *GVE : CUNode->getGlobalVariables()) {
12161213
DIGlobalVariable *GV = GVE->getVariable();
12171214
if (Processed.insert(GV).second)
12181215
CU.getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
12191216
}
1220-
#if 0
1221-
CU.setGlobalVarMap();
1222-
#endif
12231217

12241218
for (auto *Ty : CUNode->getEnumTypes())
12251219
CU.getOrCreateTypeDIE(cast<DIType>(Ty));

0 commit comments

Comments
 (0)