From ff715b240351dc2b8fba1be236d7a1746d2f0031 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 26 Jan 2013 21:55:23 +0000 Subject: PR14566: Debug Info: Removing top level lexical blocks This adds support for LLVM to accept metadata that doesn't include a top level lexical block in a function. Specifically LLVM couldn't handle this when there were file changes relating to these blocks. I've updated a few test cases to ensure other functionality (such as inlining) isn't affected by this change, but haven't pervasively updated all the test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173592 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/llvm/DebugInfo.h') diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index dd32de9f39..47b58e22e0 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -734,7 +734,7 @@ namespace llvm { class DILexicalBlockFile : public DIScope { public: explicit DILexicalBlockFile(const MDNode *N = 0) : DIScope(N) {} - DIScope getContext() const { return getScope().getContext(); } + DIScope getContext() const { if (getScope().isSubprogram()) return getScope(); return getScope().getContext(); } unsigned getLineNumber() const { return getScope().getLineNumber(); } unsigned getColumnNumber() const { return getScope().getColumnNumber(); } StringRef getDirectory() const { -- cgit v1.2.3