diff --git a/include/revng/Clift/CliftAttributes.h b/include/revng/Clift/CliftAttributes.h index 663dbd9b0..e58b07269 100644 --- a/include/revng/Clift/CliftAttributes.h +++ b/include/revng/Clift/CliftAttributes.h @@ -60,7 +60,7 @@ MutableStringAttr makeNameAttr(mlir::MLIRContext *Context, llvm::StringRef Handle, llvm::StringRef Name) { auto Attr = makeNameAttr(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() + "'";