[Lldb-commits] [PATCH] D71052: [lldb][NFC] Move Address and AddressRange functions out of Stream into namespace and let them take raw_ostream

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 5 02:39:38 PST 2019


labath added a comment.

All our namespace names are `snake_case`, so this new namespace should be too. Though, honestly, I don't think this needs to be a namespace -- I'd probably just make the function names a bit more descriptive... Maybe DumpAddress/DumpAddressRange, to match the existing DumpRegisterValue/DumpDataExtractor ?



================
Comment at: lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py:23-53
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a[1]", substrs=['(int) $2 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $3 = 2'])
+        self.expect("expr a.size()", substrs=[' $0 = 3'])
+        self.expect("expr a.front()", substrs=[' $1 = 3'])
+        self.expect("expr a[1]", substrs=[' $2 = 1'])
+        self.expect("expr a.back()", substrs=[' $3 = 2'])
 
         self.expect("expr std::sort(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $4 = 1'])
----------------
huh ?


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D71052





More information about the lldb-commits mailing list