I will be changing all DWARFDie::getAttributeValueAsXXX() over to return llvm::Optional one by one. Starting with string values.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm all for replacing the Value getAttribute(Attr attr, Value default) interfaces with Optional<Value> getAttribute(Attr attr) versions, and perhaps provide the default-value mechanism in a generic way. However, in the concrete case of a const char * return value I think LLVM typically returns a nullptr to signal failure.
Comment Actions
I thought you still wanted to get rid of the default value? It's just that Optional<PointerType> is redundant because pointers are already implicitly optional (via nullptr).