From 706b4fc47bbc608932d3b491ae19a3b9cde9497b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Jan 2020 20:45:01 +0000 Subject: Vendor import of llvm-project master e26a78e70, the last commit before the llvmorg-11-init tag, from which release/10.x was branched. --- llvm/lib/IR/Module.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'llvm/lib/IR/Module.cpp') diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 25efd009194f4..271ae126d7227 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -381,6 +381,22 @@ void Module::debug_compile_units_iterator::SkipNoDebugCUs() { ++Idx; } +iterator_range Module::global_objects() { + return concat(functions(), globals()); +} +iterator_range +Module::global_objects() const { + return concat(functions(), globals()); +} + +iterator_range Module::global_values() { + return concat(functions(), globals(), aliases(), ifuncs()); +} +iterator_range +Module::global_values() const { + return concat(functions(), globals(), aliases(), ifuncs()); +} + //===----------------------------------------------------------------------===// // Methods to control the materialization of GlobalValues in the Module. // -- cgit v1.2.3