From: Duncan P. N. Exon Smith Date: Tue, 15 Apr 2014 16:27:43 +0000 (+0000) Subject: verify-di: Call debug info verifier from clang X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba3cc0798ab565fce52427781641faeaad872a91;p=clang verify-di: Call debug info verifier from clang This is paired with a patch to LLVM that creates a separate pass for verifying debug info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206301 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index f0b3cdc50a..b75c62a422 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -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)) {