[C++11] Change DebugInfoFinder to use range-based loops

Also changes the iterators to return actual DI type over MDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204130 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alon Mishne
2014-03-18 09:41:07 +00:00
parent fabbbc96ca
commit 086494730d
8 changed files with 66 additions and 74 deletions

View File

@@ -838,10 +838,7 @@ void NVPTXAsmPrinter::recordAndEmitFilenames(Module &M) {
DbgFinder.processModule(M);
unsigned i = 1;
for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(),
E = DbgFinder.compile_unit_end();
I != E; ++I) {
DICompileUnit DIUnit(*I);
for (DICompileUnit DIUnit : DbgFinder.compile_units()) {
StringRef Filename(DIUnit.getFilename());
StringRef Dirname(DIUnit.getDirectory());
SmallString<128> FullPathName = Dirname;
@@ -856,10 +853,7 @@ void NVPTXAsmPrinter::recordAndEmitFilenames(Module &M) {
++i;
}
for (DebugInfoFinder::iterator I = DbgFinder.subprogram_begin(),
E = DbgFinder.subprogram_end();
I != E; ++I) {
DISubprogram SP(*I);
for (DISubprogram SP : DbgFinder.subprograms()) {
StringRef Filename(SP.getFilename());
StringRef Dirname(SP.getDirectory());
SmallString<128> FullPathName = Dirname;