]> granicus.if.org Git - clang/commitdiff
verify-di: Call debug info verifier from clang
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 15 Apr 2014 16:27:43 +0000 (16:27 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 15 Apr 2014 16:27:43 +0000 (16:27 +0000)
This is paired with a patch to LLVM that creates a separate pass for
verifying debug info.

<rdar://problem/15500563>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206301 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp

index f0b3cdc50a4cbcae0f9847887af58697e72c1431..b75c62a4223f1749904483d63bc3b89714e6af6d 100644 (file)
@@ -334,6 +334,8 @@ void EmitAssemblyHelper::CreatePasses() {
 
   // Set up the per-module pass manager.
   PassManager *MPM = getPerModulePasses();
+  if (CodeGenOpts.VerifyModule)
+    MPM->add(createDebugInfoVerifierPass());
 
   if (!CodeGenOpts.DisableGCov &&
       (CodeGenOpts.EmitGcovArcs || CodeGenOpts.EmitGcovNotes)) {