[PATCH] D73726: Rename llvm-prettyprinters to visualizer-tests.
Christian Sigg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 10:30:28 PST 2020
csigg created this revision.
csigg added a reviewer: dblaikie.
Herald added subscribers: llvm-commits, rriddle, mgorny.
Herald added a project: LLVM.
Why remove 'llvm'? I plan to add tests for MLIR pretty printers as well. I renamed the test files to include 'llvm' instead.
Why change 'prettyprinters' to 'visualizer'? Different debuggers use different names for variable printing (MSVC: 'debug visualizers', LLDB: 'variable formatting', GDB: 'pretty printers'). Any of them is fine, but 'visualizer' seemed to best describe the concept.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73726
Files:
debuginfo-tests/CMakeLists.txt
debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg
debuginfo-tests/llvm-prettyprinters/gdb/prettyprinters.cpp
debuginfo-tests/llvm-prettyprinters/gdb/prettyprinters.gdb
debuginfo-tests/visualizer-tests/gdb/lit.local.cfg
debuginfo-tests/visualizer-tests/gdb/llvm-support.cpp
debuginfo-tests/visualizer-tests/gdb/llvm-support.gdb
Index: debuginfo-tests/visualizer-tests/gdb/llvm-support.gdb
===================================================================
--- debuginfo-tests/visualizer-tests/gdb/llvm-support.gdb
+++ debuginfo-tests/visualizer-tests/gdb/llvm-support.gdb
@@ -1,4 +1,4 @@
-# RUN: gdb -q -batch -n -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' -x %s %llvm_tools_dir/prettyprinters | FileCheck %s
+# RUN: gdb -q -batch -n -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' -x %s %llvm_tools_dir/llvm-support | FileCheck %s
break main
run
Index: debuginfo-tests/visualizer-tests/gdb/llvm-support.cpp
===================================================================
--- debuginfo-tests/visualizer-tests/gdb/llvm-support.cpp
+++ debuginfo-tests/visualizer-tests/gdb/llvm-support.cpp
@@ -47,4 +47,8 @@
return Result;
}();
+// Check expected instances to avoid compile errors.
+auto CheckExpectedValue = static_cast<bool>(ExpectedValue);
+auto CheckExpectedError = static_cast<bool>(ExpectedError);
+
int main() { return 0; }
Index: debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg
===================================================================
--- /dev/null
+++ debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg
@@ -1,9 +0,0 @@
-import lit.util
-
-# debuginfo-tests are not expected to pass in a cross-compilation setup.
-if 'native' not in config.available_features or lit.util.which('gdb') is None:
- config.unsupported = True
-
-config.suffixes = ['.gdb']
-
-
Index: debuginfo-tests/CMakeLists.txt
===================================================================
--- debuginfo-tests/CMakeLists.txt
+++ debuginfo-tests/CMakeLists.txt
@@ -2,10 +2,10 @@
# various types of debug info, and then run those programs under a debugger
# such as GDB or LLDB to verify the results.
-add_llvm_executable(prettyprinters
- llvm-prettyprinters/gdb/prettyprinters.cpp
+add_llvm_executable(llvm-support
+ visualizer-tests/gdb/llvm-support.cpp
)
-target_link_libraries(prettyprinters PRIVATE LLVMSupport)
+target_link_libraries(llvm-support PRIVATE LLVMSupport)
set(DEBUGINFO_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(DEBUGINFO_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -15,8 +15,8 @@
FileCheck
count
llvm-objdump
+ llvm-support
not
- prettyprinters
)
# The Windows builder scripts pass -fuse-ld=lld.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73726.241504.patch
Type: text/x-patch
Size: 2395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200130/d2631f32/attachment.bin>
More information about the llvm-commits
mailing list