[llvm] r343397 - Fix some tests on Windows.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 29 17:22:22 PDT 2018
Author: zturner
Date: Sat Sep 29 17:22:21 2018
New Revision: 343397
URL: http://llvm.org/viewvc/llvm-project?rev=343397&view=rev
Log:
Fix some tests on Windows.
I don't actually have a Windows machine at the present moment,
so hopefully this fixes it.
Modified:
llvm/trunk/test/tools/llvm-pdbdump/regex-filter.test
llvm/trunk/tools/llvm-pdbutil/PrettyTypeDumper.cpp
Modified: llvm/trunk/test/tools/llvm-pdbdump/regex-filter.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-pdbdump/regex-filter.test?rev=343397&r1=343396&r2=343397&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-pdbdump/regex-filter.test (original)
+++ llvm/trunk/test/tools/llvm-pdbdump/regex-filter.test Sat Sep 29 17:22:21 2018
@@ -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
Modified: llvm/trunk/tools/llvm-pdbutil/PrettyTypeDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/PrettyTypeDumper.cpp?rev=343397&r1=343396&r2=343397&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/PrettyTypeDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/PrettyTypeDumper.cpp Sat Sep 29 17:22:21 2018
@@ -292,7 +292,7 @@ void TypeDumper::dump(const PDBSymbolTyp
void TypeDumper::dump(const PDBSymbolTypePointer &Symbol) {
std::unique_ptr<PDBSymbol> P = Symbol.getPointeeType();
- if (auto *FS = dyn_cast<PDBSymbolTypeFunctionSig>(P.get())) {
+ if (auto *FS = dyn_cast_or_null<PDBSymbolTypeFunctionSig>(P.get())) {
FunctionDumper Dumper(Printer);
FunctionDumper::PointerType PT =
Symbol.isReference() ? FunctionDumper::PointerType::Reference
@@ -301,9 +301,9 @@ void TypeDumper::dump(const PDBSymbolTyp
return;
}
- if (auto *UDT = dyn_cast<PDBSymbolTypeUDT>(P.get())) {
+ if (auto *UDT = dyn_cast_or_null<PDBSymbolTypeUDT>(P.get())) {
printClassDecl(Printer, *UDT);
- } else {
+ } else if (P) {
P->dump(*this);
}
More information about the llvm-commits
mailing list