[PATCH] D106585: Fix clang debug info irgen of i128 enums

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 13:19:39 PDT 2021


mizvekov added a comment.

Small nit but otherwise LGTM :)



================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:3118
+    Value.setIsSigned(IsSigned);
+    Enumerators.push_back(DBuilder.createEnumerator(Enum->getName(), Value));
   }
----------------



================
Comment at: llvm/lib/IR/DIBuilder.cpp:255
+  assert(!Name.empty() && "Unable to create enumerator without name");
+  return DIEnumerator::get(VMContext, APInt(Value), Value.isUnsigned(), Name);
+}
----------------
Do I get it right, and this is not the first place that I noticed this, but the terminology here is a bit unconventional with regards to "Signed" vs "Negative"?

It looks like around the debug info code, an APSInt will be a signed positive value for representing a negative number, and an unsigned one to represent a positive value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106585



More information about the cfe-commits mailing list