support LLVM trunk after r202736 revision

This commit is contained in:
Ilia Filippov
2014-03-04 16:02:25 +04:00
parent 38ce3f368c
commit c017e46820

View File

@@ -1546,7 +1546,14 @@ FunctionEmitContext::StartScope() {
llvm::DILexicalBlock lexicalBlock =
m->diBuilder->createLexicalBlock(parentScope, diFile,
currentPos.first_line,
#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
currentPos.first_column);
#endif
AssertPos(currentPos, lexicalBlock.Verify());
debugScopes.push_back(lexicalBlock);
}