[llvm] r261298 - llvm-dwp: Don't test compression when zlib isn't available
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 18:03:45 PST 2016
Author: dblaikie
Date: Thu Feb 18 20:03:45 2016
New Revision: 261298
URL: http://llvm.org/viewvc/llvm-project?rev=261298&view=rev
Log:
llvm-dwp: Don't test compression when zlib isn't available
Modified:
llvm/trunk/test/tools/llvm-dwp/X86/compress.test
llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
Modified: llvm/trunk/test/tools/llvm-dwp/X86/compress.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-dwp/X86/compress.test?rev=261298&r1=261297&r2=261298&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-dwp/X86/compress.test (original)
+++ llvm/trunk/test/tools/llvm-dwp/X86/compress.test Thu Feb 18 20:03:45 2016
@@ -1,6 +1,8 @@
RUN: llvm-dwp %p/../Inputs/compress/a.dwo -o %t
RUN: llvm-dwarfdump %t | FileCheck %s
+REQUIRES: zlib
+
Simple test built from this input which produces DWARF long enough to be compressed in the .[z]debug_info section:
void f(int a, int b, int c, int d) {
Modified: llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp?rev=261298&r1=261297&r2=261298&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp (original)
+++ llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp Thu Feb 18 20:03:45 2016
@@ -350,7 +350,7 @@ static std::error_code write(MCStreamer
uint64_t OriginalSize;
if (!zlib::isAvailable() ||
!consumeCompressedDebugSectionHeader(Contents, OriginalSize))
- continue;
+ return make_error_code(std::errc::invalid_argument);
UncompressedSections.resize(UncompressedSections.size() + 1);
if (zlib::uncompress(Contents, UncompressedSections.back(), OriginalSize) !=
zlib::StatusOK) {
More information about the llvm-commits
mailing list