[Mlir-commits] [mlir] [mlir] Add support for DIGlobalVariable and DIGlobalVariableExpression (PR #73367)
Christian Ulmann
llvmlistbot at llvm.org
Mon Nov 27 23:03:12 PST 2023
================
@@ -61,7 +61,11 @@ DICompositeTypeAttr DebugImporter::translateImpl(llvm::DICompositeType *node) {
SmallVector<DINodeAttr> elements;
for (llvm::DINode *element : node->getElements()) {
assert(element && "expected a non-null element type");
- elements.push_back(translate(element));
+ const auto translatedElement = translate(element);
+ if (translatedElement) {
+ // TODO: Should this fail if the returned attribute is invalid?
----------------
Dinistro wrote:
I would suggest to fail in such a case. Explicit failures help to detect bugs while implicit failures might be very hard to track down.
https://github.com/llvm/llvm-project/pull/73367
More information about the Mlir-commits
mailing list