]> granicus.if.org Git - llvm/commitdiff
[llvm-pdbutil] FunctionDumper::dump(PDBSymbolTypeFunctionArg) - fix null dereference...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 29 Apr 2019 19:40:12 +0000 (19:40 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 29 Apr 2019 19:40:12 +0000 (19:40 +0000)
Reported in https://www.viva64.com/en/b/0629/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359488 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-pdbutil/PrettyFunctionDumper.cpp

index 126ee97eca1133b6590704d1098f1f400b743f36..a5621fb3086fc620a9f55b6a9a6dda4f5f730c49 100644 (file)
@@ -228,9 +228,9 @@ void FunctionDumper::dump(const PDBSymbolTypeFunctionArg &Symbol) {
   uint32_t TypeId = Symbol.getTypeId();
   auto Type = Symbol.getSession().getSymbolById(TypeId);
   if (Type)
-    Printer << "<unknown-type>";
-  else
     Type->dump(*this);
+  else
+    Printer << "<unknown-type>";
 }
 
 void FunctionDumper::dump(const PDBSymbolTypeTypedef &Symbol) {