[llvm] r265517 - Revert "[IRVerifier] Don't crash on invalid DIFile inside DISubprogram."
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 21:34:39 PDT 2016
Author: davide
Date: Tue Apr 5 23:34:38 2016
New Revision: 265517
URL: http://llvm.org/viewvc/llvm-project?rev=265517&view=rev
Log:
Revert "[IRVerifier] Don't crash on invalid DIFile inside DISubprogram."
This reverts commit r265515 as lots of tests need to be fixed before
this actually can go in.
Removed:
llvm/trunk/test/Verifier/dbg-difile-crash.ll
Modified:
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=265517&r1=265516&r2=265517&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Tue Apr 5 23:34:38 2016
@@ -988,8 +988,6 @@ void Verifier::visitDICompileUnit(const
void Verifier::visitDISubprogram(const DISubprogram &N) {
Assert(N.getTag() == dwarf::DW_TAG_subprogram, "invalid tag", &N);
Assert(isScopeRef(N, N.getRawScope()), "invalid scope", &N, N.getRawScope());
- Assert(N.getRawFile() && isa<DIFile>(N.getRawFile()), "invalid file", &N,
- N.getRawFile());
if (auto *T = N.getRawType())
Assert(isa<DISubroutineType>(T), "invalid subroutine type", &N, T);
Assert(isTypeRef(N, N.getRawContainingType()), "invalid containing type", &N,
Removed: llvm/trunk/test/Verifier/dbg-difile-crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/dbg-difile-crash.ll?rev=265516&view=auto
==============================================================================
--- llvm/trunk/test/Verifier/dbg-difile-crash.ll (original)
+++ llvm/trunk/test/Verifier/dbg-difile-crash.ll (removed)
@@ -1,10 +0,0 @@
-; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
-; CHECK: assembly parsed, but does not verify
-; CHECK-NEXT: invalid file
-
-!llvm.module.flags = !{!0}
-!0 = !{i32 2, !"Debug Info Version", i32 3}
-!llvm.dbg.cu = !{!1}
-!1 = distinct !DICompileUnit(file: !2, language: DW_LANG_C99, subprograms: !{!3})
-!2 = !DIFile(filename: "file.c", directory: "/path/to/dir")
-!3 = distinct !DISubprogram(name: "blah", file: !1)
More information about the llvm-commits
mailing list