From 5ba7d2696d1ab92d7e2c5502a6bbf803ea9eb58d Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskiy Date: Sun, 24 Aug 2014 12:56:46 +0400 Subject: [PATCH 1/2] Fix for llvm revision 216239 --- ctx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ctx.cpp b/ctx.cpp index eb681d4c..7e1f8770 100644 --- a/ctx.cpp +++ b/ctx.cpp @@ -1546,12 +1546,14 @@ FunctionEmitContext::StartScope() { llvm::DILexicalBlock lexicalBlock = m->diBuilder->createLexicalBlock(parentScope, diFile, currentPos.first_line, -#if !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) // LLVM 3.5+ +#if defined(LLVM_3_5) // Revision 202736 in LLVM adds support of DWARF discriminator // to the last argument and revision 202737 in clang adds 0 // for the last argument by default. currentPos.first_column, 0); #else + // Revision 216239 in LLVM removes support of DWARF discriminator + // as the last argument currentPos.first_column); #endif AssertPos(currentPos, lexicalBlock.Verify()); From 93c7ddbac574ab08559971a97b8fc6d18e7ab5ca Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskiy Date: Sun, 24 Aug 2014 21:37:42 +0400 Subject: [PATCH 2/2] Added supported LLVM versions --- ctx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctx.cpp b/ctx.cpp index 7e1f8770..a2a07fb7 100644 --- a/ctx.cpp +++ b/ctx.cpp @@ -1555,7 +1555,7 @@ FunctionEmitContext::StartScope() { // Revision 216239 in LLVM removes support of DWARF discriminator // as the last argument currentPos.first_column); -#endif +#endif // LLVM 3.2, 3.3, 3.4 and 3.6+ AssertPos(currentPos, lexicalBlock.Verify()); debugScopes.push_back(lexicalBlock); }