[llvm] r228608 - IR: Document horrible abuse of loose DIDescriptor, NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Feb 9 13:26:34 PST 2015


Author: dexonsmith
Date: Mon Feb  9 15:26:34 2015
New Revision: 228608

URL: http://llvm.org/viewvc/llvm-project?rev=228608&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/IR/DebugInfo.h

Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=228608&r1=228607&r2=228608&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Mon Feb  9 15:26:34 2015
@@ -691,6 +691,8 @@ class DILexicalBlockFile : public DIScop
 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();





More information about the llvm-commits mailing list