dblaikie added inline comments.

================
Comment at: llvm/lib/IR/Attributes.cpp:660-663
+bool AttributeImpl::getValueAsBool() const {
+  assert(getValueAsString().empty() || getValueAsString() == "false" || 
getValueAsString() == "true");
+  return getValueAsString() == "true";
+}
----------------
Is it maybe worth using named constants rather than string literals, so this 
true and false matches up with the true/false in StrBoolAttr? (I assume that's 
where these strings are produced?)



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99299

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to