From e14208f48925f692ac95898715fedb1cbbb196f3 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Wed, 24 Aug 2011 22:28:20 +0100 Subject: [PATCH] Update to call DIBuilder::finalize() with LLVM 3.0 --- module.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module.cpp b/module.cpp index b3fd5e1c..1c457573 100644 --- a/module.cpp +++ b/module.cpp @@ -889,6 +889,11 @@ Module::AddFunction(DeclSpecs *ds, Declarator *decl, Stmt *code) { bool Module::WriteOutput(OutputType outputType, const char *outFileName) { +#if defined(LLVM_3_0) || defined(LLVM_3_0svn) + if (diBuilder != NULL && outputType != Header) + diBuilder->finalize(); +#endif // LLVM_3_0 + // First, issue a warning if the output file suffix and the type of // file being created seem to mismatch. This can help catch missing // command-line arguments specifying the output file type.