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
This commit is contained in:
Zachary Turner 2018-09-30 00:22:21 +00:00
parent 98440293fb
commit a1e79e326a
2 changed files with 4 additions and 8 deletions

View File

@ -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

View File

@ -292,7 +292,7 @@ void TypeDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) {
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 PDBSymbolTypePointer &Symbol) {
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);
}