summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorAlon Mishne <alon.mishne@intel.com>2014-03-18 09:41:07 +0000
committerAlon Mishne <alon.mishne@intel.com>2014-03-18 09:41:07 +0000
commitad312155a6a357e3ed73232f8f945f2bd75886b4 (patch)
treeef1a15009d4b5cfad4d18242abd2543c87e75a03 /llvm/lib/IR/Verifier.cpp
parentaa5b5f7b0d8f90f208bd070e000f166fa87d108a (diff)
downloadbcm5719-llvm-ad312155a6a357e3ed73232f8f945f2bd75886b4.tar.gz
bcm5719-llvm-ad312155a6a357e3ed73232f8f945f2bd75886b4.zip
[C++11] Change DebugInfoFinder to use range-based loops
Also changes the iterators to return actual DI type over MDNode. llvm-svn: 204130
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 2fc77cc2d72..50c6ae204e9 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2355,22 +2355,21 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
void Verifier::verifyDebugInfo() {
// Verify Debug Info.
if (!DisableDebugInfoVerifier) {
- for (DebugInfoFinder::iterator I = Finder.compile_unit_begin(),
- E = Finder.compile_unit_end(); I != E; ++I)
- Assert1(DICompileUnit(*I).Verify(), "DICompileUnit does not Verify!", *I);
- for (DebugInfoFinder::iterator I = Finder.subprogram_begin(),
- E = Finder.subprogram_end(); I != E; ++I)
- Assert1(DISubprogram(*I).Verify(), "DISubprogram does not Verify!", *I);
- for (DebugInfoFinder::iterator I = Finder.global_variable_begin(),
- E = Finder.global_variable_end(); I != E; ++I)
- Assert1(DIGlobalVariable(*I).Verify(),
- "DIGlobalVariable does not Verify!", *I);
- for (DebugInfoFinder::iterator I = Finder.type_begin(),
- E = Finder.type_end(); I != E; ++I)
- Assert1(DIType(*I).Verify(), "DIType does not Verify!", *I);
- for (DebugInfoFinder::iterator I = Finder.scope_begin(),
- E = Finder.scope_end(); I != E; ++I)
- Assert1(DIScope(*I).Verify(), "DIScope does not Verify!", *I);
+ for (DICompileUnit CU : Finder.compile_units()) {
+ Assert1(CU.Verify(), "DICompileUnit does not Verify!", CU);
+ }
+ for (DISubprogram S : Finder.subprograms()) {
+ Assert1(S.Verify(), "DISubprogram does not Verify!", S);
+ }
+ for (DIGlobalVariable GV : Finder.global_variables()) {
+ Assert1(GV.Verify(), "DIGlobalVariable does not Verify!", GV);
+ }
+ for (DIType T : Finder.types()) {
+ Assert1(T.Verify(), "DIType does not Verify!", T);
+ }
+ for (DIScope S : Finder.scopes()) {
+ Assert1(S.Verify(), "DIScope does not Verify!", S);
+ }
}
}
OpenPOWER on IntegriCloud