[PATCH] D72321: Add test for GDB pretty printers.

Christian Sigg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 02:27:29 PST 2020


csigg updated this revision to Diff 236538.
csigg added a comment.

Fix variable name casing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72321/new/

https://reviews.llvm.org/D72321

Files:
  debuginfo-tests/gdb-tests/prettyprinters.cpp


Index: debuginfo-tests/gdb-tests/prettyprinters.cpp
===================================================================
--- debuginfo-tests/gdb-tests/prettyprinters.cpp
+++ debuginfo-tests/gdb-tests/prettyprinters.cpp
@@ -1,7 +1,7 @@
 // RUN: env DEBUGGER=gdb %test_debuginfo %s %llvm_tools_dir/prettyprinters "-iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py'"
 
 // DEBUGGER: delete breakpoints
-// DEBUGGER: break break_hook
+// DEBUGGER: break breakHook
 // DEBUGGER: run
 // DEBUGGER: up
 // DEBUGGER: info locals
@@ -14,44 +14,44 @@
 #include "llvm/ADT/Twine.h"
 #include "llvm/Support/Error.h"
 
-void break_hook() {}
-int array[] = {1, 2, 3};
+void breakHook() {}
+int Array[] = {1, 2, 3};
 
 int __attribute__((optimize("O0"))) main() {
-  // CHECK: arrayRef = llvm::ArrayRef of length 3 = {1, 2, 3}
-  llvm::ArrayRef<int> arrayRef(array);
-  // CHECK: mutableArrayRef = llvm::ArrayRef of length 3 = {1, 2, 3}
-  llvm::MutableArrayRef<int> mutableArrayRef(array);
+  // CHECK: ArrayRef = llvm::ArrayRef of length 3 = {1, 2, 3}
+  llvm::ArrayRef<int> ArrayRef(Array);
+  // CHECK: MutableArrayRef = llvm::ArrayRef of length 3 = {1, 2, 3}
+  llvm::MutableArrayRef<int> MutableArrayRef(Array);
 
-  // CHECK: denseMap = llvm::DenseMap with 2 elements = {
+  // CHECK: DenseMap = llvm::DenseMap with 2 elements = {
   // CHECK:   [4] = 5,
   // CHECK:   [6] = 7,
   // CHECK: }
-  llvm::DenseMap<int, int> denseMap({{4, 5}, {6, 7}});
+  llvm::DenseMap<int, int> DenseMap({{4, 5}, {6, 7}});
 
-  // CHECK: expectedValue = llvm::Expected = {value = 8}
-  llvm::Expected<int> expectedValue(8);
-  // CHECK: expectedError = llvm::Expected is error
-  llvm::Expected<int> expectedError(llvm::createStringError({}, ""));
+  // CHECK: ExpectedValue = llvm::Expected = {value = 8}
+  llvm::Expected<int> ExpectedValue(8);
+  // CHECK: ExpectedError = llvm::Expected is error
+  llvm::Expected<int> ExpectedError(llvm::createStringError({}, ""));
 
-  // CHECK: optionalValue = llvm::Optional = {value = 9}
-  llvm::Optional<int> optionalValue(9);
-  // CHECK: optionalNone = llvm::Optional is not initialized
-  llvm::Optional<int> optionalNone(llvm::None);
+  // CHECK: OptionalValue = llvm::Optional = {value = 9}
+  llvm::Optional<int> OptionalValue(9);
+  // CHECK: OptionalNone = llvm::Optional is not initialized
+  llvm::Optional<int> OptionalNone(llvm::None);
 
-  // CHECK: smallVector = llvm::SmallVector of Size 3, Capacity 5 = {10, 11, 12}
-  llvm::SmallVector<int, 5> smallVector = {10, 11, 12};
+  // CHECK: SmallVector = llvm::SmallVector of Size 3, Capacity 5 = {10, 11, 12}
+  llvm::SmallVector<int, 5> SmallVector = {10, 11, 12};
 
-  // CHECK: smallString = "foo"
-  llvm::SmallString<5> smallString("foo");
+  // CHECK: SmallString = "foo"
+  llvm::SmallString<5> SmallString("foo");
 
-  // CHECK: stringRef = "bar"
-  llvm::StringRef stringRef = "bar";
+  // CHECK: StringRef = "bar"
+  llvm::StringRef StringRef = "bar";
 
-  // CHECK: twine = "\"foo\"\"bar\""
-  llvm::Twine twine = llvm::Twine(smallString) + stringRef;
-  (void)twine;
+  // CHECK: Twine = "\"foo\"\"bar\""
+  llvm::Twine Twine = llvm::Twine(smallString) + stringRef;
+  (void)Twine;
 
-  break_hook();
+  breakHook();
   return 0;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72321.236538.patch
Type: text/x-patch
Size: 3239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200107/faa1bc3d/attachment-0001.bin>


More information about the llvm-commits mailing list