diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/StripSymbols.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/StripSymbols.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp index ef43dd2d37b..bcead02d80a 100644 --- a/llvm/lib/Transforms/IPO/StripSymbols.cpp +++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp @@ -321,11 +321,8 @@ bool StripDeadDebugInfo::runOnModule(Module &M) { } // Create our live global variable list. - MDGlobalVariableArray GVs = DIC->getGlobalVariables(); bool GlobalVariableChange = false; - for (unsigned i = 0, e = GVs.size(); i != e; ++i) { - DIGlobalVariable DIG = GVs[i]; - + for (MDGlobalVariable *DIG : DIC->getGlobalVariables()) { // Make sure we only visit each global variable only once. if (!VisitedSet.insert(DIG).second) continue; |