From: Zachary Turner Date: Sun, 30 Sep 2018 00:22:21 +0000 (+0000) Subject: Fix some tests on Windows. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1e79e326a0734885f1713325d34f90132aa960c;p=platform%2Fupstream%2Fllvm.git Fix some tests on Windows. I don't actually have a Windows machine at the present moment, so hopefully this fixes it. llvm-svn: 343397 --- diff --git a/llvm/test/tools/llvm-pdbdump/regex-filter.test b/llvm/test/tools/llvm-pdbdump/regex-filter.test index fb8ca7f..1c49009 100644 --- a/llvm/test/tools/llvm-pdbdump/regex-filter.test +++ b/llvm/test/tools/llvm-pdbdump/regex-filter.test @@ -13,7 +13,7 @@ ; RUN: llvm-pdbutil pretty -types -module-syms -globals -exclude-symbols="MemberVar|GlobalVar" \ ; RUN: %p/Inputs/FilterTest.pdb | FileCheck --check-prefix=EXCLUDE_VARS %s -; RUN: llvm-pdbutil pretty -types -exclude-types="FilterTestClass" \ +; RUN: llvm-pdbutil pretty -classes -exclude-types="FilterTestClass" \ ; RUN: %p/Inputs/FilterTest.pdb | FileCheck --check-prefix=EXCLUDE_WHOLE_CLASS %s ; RUN: llvm-pdbutil pretty -module-syms -globals -exclude-compilands="FilterTest.obj" \ ; RUN: %p/Inputs/FilterTest.pdb | FileCheck --check-prefix=EXCLUDE_COMPILAND %s @@ -68,10 +68,6 @@ ; EXCLUDE_WHOLE_CLASS: ---TYPES--- ; EXCLUDE_WHOLE_CLASS-NOT: class FilterTestClass -; EXCLUDE_WHOLE_CLASS-NOT: typedef int NestedTypedef -; EXCLUDE_WHOLE_CLASS-NOT: enum NestedEnum -; EXCLUDE_WHOLE_CLASS-NOT: int IntMemberVar -; EXCLUDE_WHOLE_CLASS-NOT: double DoubleMemberVar ; EXCLUDE_COMPILAND: ---SYMBOLS--- ; EXCLUDE_COMPILAND-NOT: FilterTest.obj diff --git a/llvm/tools/llvm-pdbutil/PrettyTypeDumper.cpp b/llvm/tools/llvm-pdbutil/PrettyTypeDumper.cpp index 093164b..2de2403 100644 --- a/llvm/tools/llvm-pdbutil/PrettyTypeDumper.cpp +++ b/llvm/tools/llvm-pdbutil/PrettyTypeDumper.cpp @@ -292,7 +292,7 @@ void TypeDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) { void TypeDumper::dump(const PDBSymbolTypePointer &Symbol) { std::unique_ptr P = Symbol.getPointeeType(); - if (auto *FS = dyn_cast(P.get())) { + if (auto *FS = dyn_cast_or_null(P.get())) { FunctionDumper Dumper(Printer); FunctionDumper::PointerType PT = Symbol.isReference() ? FunctionDumper::PointerType::Reference @@ -301,9 +301,9 @@ void TypeDumper::dump(const PDBSymbolTypePointer &Symbol) { return; } - if (auto *UDT = dyn_cast(P.get())) { + if (auto *UDT = dyn_cast_or_null(P.get())) { printClassDecl(Printer, *UDT); - } else { + } else if (P) { P->dump(*this); }