[llvm-branch-commits] [llvm-branch] r228985 - Merging r226616:

Hans Wennborg hans at hanshq.net
Thu Feb 12 15:46:59 PST 2015


Author: hans
Date: Thu Feb 12 17:46:59 2015
New Revision: 228985

URL: http://llvm.org/viewvc/llvm-project?rev=228985&view=rev
Log:
Merging r226616:
------------------------------------------------------------------------
r226616 | adrian | 2015-01-20 14:37:25 -0800 (Tue, 20 Jan 2015) | 2 lines

DebugLocs without a scope should fail the verification.
Follow-up to r226588.
------------------------------------------------------------------------

Added:
    llvm/branches/release_36/test/DebugInfo/location-verifier.ll
      - copied unchanged from r226616, llvm/trunk/test/DebugInfo/location-verifier.ll
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:46:59 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,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
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226588,226616,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=228985&r1=228984&r2=228985&view=diff
==============================================================================
--- llvm/branches/release_36/lib/IR/DebugInfo.cpp (original)
+++ llvm/branches/release_36/lib/IR/DebugInfo.cpp Thu Feb 12 17:46:59 2015
@@ -525,15 +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");
+        if (!Scope)
+          return false;
         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");
+          assert(Scope && "lexical block file has no scope");
         }
         if (!DISubprogram(Scope).describes(F))
           return false;





More information about the llvm-branch-commits mailing list