[PATCH] D147485: [Object] Refactor build ID parsing into Object lib.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 10:49:11 PDT 2023


mysterymath added inline comments.


================
Comment at: llvm/lib/Object/BuildID.cpp:21-22
 
-namespace llvm {
-namespace object {
+using namespace llvm;
+using namespace llvm::object;
 
----------------
jhenderson wrote:
> Why have you changed this?
To make the new code comply with the style guide: https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
Since this is a refactoring change, I altered the existing definitions so the file would be internally consistent.


================
Comment at: llvm/test/DebugInfo/symbolize-filter-markup-parse-fields.test:21
 CHECK: error: expected build ID; found ''
-CHECK: error: expected build ID; found '0'
+CHECK-NOT: '0'
 CHECK-NOT: '0xff'
----------------
jhenderson wrote:
> This check feels a bit fragile. Also, why has there been a behaviour change?
Different places that parsed build IDs disagreed on whether or not this was an error. I chose a semantics for build IDs consistent with the behavior of fromHex, since that appears to be the semantics generally used for  hex->binary conversion.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147485



More information about the llvm-commits mailing list