summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 17b622458c4..0aa0b8014f0 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2126,11 +2126,8 @@ AssemblyWriter::AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac,
if (!TheModule)
return;
TypePrinter.incorporateTypes(*TheModule);
- for (const Function &F : *TheModule)
- if (const Comdat *C = F.getComdat())
- Comdats.insert(C);
- for (const GlobalVariable &GV : TheModule->globals())
- if (const Comdat *C = GV.getComdat())
+ for (const GlobalObject &GO : TheModule->global_objects())
+ if (const Comdat *C = GO.getComdat())
Comdats.insert(C);
}
OpenPOWER on IntegriCloud