fix allow introducing function attributes
ADD
tests/alive-tv/attrs/intro-fail.srctgt.ll
+; FIXME: this should fail!
+
+define void @src(i8* %p) {
+ store i8 1, i8* %p
+ ret void
+}
+
+define void @tgt(i8* %p) readonly {
+ store i8 1, i8* %p
+ ret void
+}

ADD
tests/alive-tv/attrs/intro.srctgt.ll
+define i8 @src(i8* %p) {
+ %v = load i8, i8* %p
+ ret i8 %v
+}
+
+define i8 @tgt(i8* %p) readonly {
+ %v = load i8, i8* %p
+ ret i8 %v
+}

MODIFY
tools/transform.cpp
tools/transform.cpp
@@ -936,8 +936,7 @@ pair<unique_ptr<State>, unique_ptr<State>> TransformVerify::exec() const {
}
Errors TransformVerify::verify() const {
- if (t.src.getFnAttrs() != t.tgt.getFnAttrs() ||
- !t.src.hasSameInputs(t.tgt)) {
+ if (!t.src.hasSameInputs(t.tgt)) {
return { "Unsupported interprocedural transformation: signature mismatch "
"between src and tgt", false };
}

fix #529: allow introducing function attributes