From: Duncan P. N. Exon Smith Date: Mon, 9 Feb 2015 21:26:34 +0000 (+0000) Subject: IR: Document horrible abuse of loose DIDescriptor, NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=edbd61d9994190f46b9d29773650dcc13b6b29a0;p=oota-llvm.git IR: Document horrible abuse of loose DIDescriptor, NFC I'll circle back and fix this somehow; for now I just don't want to forget about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228608 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index fd8ed81865a..d2a5fb27199 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/include/llvm/IR/DebugInfo.h @@ -691,6 +691,8 @@ class DILexicalBlockFile : public DIScope { public: explicit DILexicalBlockFile(const MDNode *N = nullptr) : DIScope(N) {} DIScope getContext() const { + // FIXME: This logic is horrible. getScope() returns a DILexicalBlock, but + // then we check if it's a subprogram? WHAT?!? if (getScope().isSubprogram()) return getScope(); return getScope().getContext();