[llvm-branch-commits] [llvm-branch] r228984 - Merging r226588:

Hans Wennborg hans at hanshq.net
Thu Feb 12 15:45:01 PST 2015


Author: hans
Date: Thu Feb 12 17:45:01 2015
New Revision: 228984

URL: http://llvm.org/viewvc/llvm-project?rev=228984&view=rev
Log:
Merging r226588:
------------------------------------------------------------------------
r226588 | adrian | 2015-01-20 10:03:37 -0800 (Tue, 20 Jan 2015) | 1 line

Add an assertion and prefer a crash over an infinite loop.
------------------------------------------------------------------------

Modified:
    llvm/branches/release_36/   (props changed)
    llvm/branches/release_36/lib/IR/DebugInfo.cpp

Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 12 17:45:01 2015
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761,228793,228842,228899,228957,228979
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226588,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761,228793,228842,228899,228957,228979

Modified: llvm/branches/release_36/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/IR/DebugInfo.cpp?rev=228984&r1=228983&r2=228984&view=diff
==============================================================================
--- llvm/branches/release_36/lib/IR/DebugInfo.cpp (original)
+++ llvm/branches/release_36/lib/IR/DebugInfo.cpp Thu Feb 12 17:45:01 2015
@@ -525,12 +525,15 @@ bool DISubprogram::Verify() const {
         while ((IA = DL.getInlinedAt()))
           DL = DebugLoc::getFromDILocation(IA);
         DL.getScopeAndInlinedAt(Scope, IA);
+        assert(Scope && "debug location has no scope");
         assert(!IA);
         while (!DIDescriptor(Scope).isSubprogram()) {
           DILexicalBlockFile D(Scope);
           Scope = D.isLexicalBlockFile()
                       ? D.getScope()
                       : DebugLoc::getFromDILexicalBlock(Scope).getScope();
+          if (!Scope)
+            llvm_unreachable("lexical block file has no scope");
         }
         if (!DISubprogram(Scope).describes(F))
           return false;





More information about the llvm-branch-commits mailing list