[all-commits] [llvm/llvm-project] 93b82f: [lldb] [Host] Refactor XML converting getters

Michał Górny via All-commits all-commits at lists.llvm.org
Mon Sep 27 05:26:51 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 93b82f45bc3e58a526d2486841ea6d96b407807e
      https://github.com/llvm/llvm-project/commit/93b82f45bc3e58a526d2486841ea6d96b407807e
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M lldb/source/Host/common/XML.cpp
    M lldb/unittests/Host/CMakeLists.txt
    A lldb/unittests/Host/XMLTest.cpp

  Log Message:
  -----------
  [lldb] [Host] Refactor XML converting getters

Refactor the XML converting attribute and text getters to use LLVM API.
While at it, remove some redundant error and missing XML support
handling, as the called base functions do that anyway.  Add tests
for these methods.

Note that this patch changes the getter behavior to be IMHO more
correct.  In particular:

- negative and overflowing integers are now reported as failures to
  convert, rather than being wrapped over or capped

- digits followed by text are now reported as failures to convert
  to double, rather than their numeric part being converted

Differential Revision: https://reviews.llvm.org/D110410




More information about the All-commits mailing list