[Lldb-commits] [PATCH] D41427: Fix crash when parsing the type of a function without any arguments

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 22 21:24:10 PST 2017


zturner added a comment.

This was originally written as a unit test because at the time we didn't have `lldb-test`.  To be honest I think it's time to remove these checked in binaries and convert everything to FileCheck tests.  There's a couple of reasons this is more practical.  For starters, the binaries can be really large and having lots of large binaries in the repo is a real drag for developers.  Secondly, we've recently had some bug reports where some virus scan software is flagging our executables as malicious due to some heuristics.  So while you're just modifying an existing binary / test, if it's not a ton of work I would really prefer standardizing on `lldb-test` + `FileCheck` for this sort of thing.  Did you explore that at all?

While there's a little higher up front cost because you have to go update the `lldb-test` tool to support this, after that work is done it will make writing future tests very easy.  All you would need is something like this:

  REQUIRES: system-windows
  RUN: clang-cl /Z7 /c %S/Inputs/foo.cpp /o %T/foo.cpp.obj
  RUN: link /DEBUG /PDB:%T/foo.cpp.pdb /Fo:%T/foo.cpp.exe
  RUN: lldb-test symbols -types foo.cpp.exe | FileCheck %s
  
  CHECK: int(*FuncPointerTypedef)();
  CHECK: int(*VariadicFuncPointerTypedef)(char,...);


Repository:
  rL LLVM

https://reviews.llvm.org/D41427





More information about the lldb-commits mailing list