mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
makeNameAttr: soften the check
When de-serializing, MLIR pre-populates the value outside of our control. As such, we cannot assert that it's always empty. So, the least we can do is assert that value is the same.
This commit is contained in:
committed by
Pietro Fezzardi
parent
0d2ae728f3
commit
e02aa215fa
@@ -60,7 +60,7 @@ MutableStringAttr makeNameAttr(mlir::MLIRContext *Context,
|
||||
llvm::StringRef Handle,
|
||||
llvm::StringRef Name) {
|
||||
auto Attr = makeNameAttr<T>(Context, Handle);
|
||||
if (not Attr.getValue().empty()) {
|
||||
if (not Attr.getValue().empty() and Attr.getValue() != Name) {
|
||||
std::string Error = "Name attribute already has a value that differs "
|
||||
"from the new one: '"
|
||||
+ Attr.getValue().str() + "' vs '" + Name.str() + "'";
|
||||
|
||||
Reference in New Issue
Block a user