Skip to content

Commit bc1ffd0

Browse files
authored
Fix Attributor ABI change on 15 (rust-lang#631)
1 parent 794fa9c commit bc1ffd0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

enzyme/Enzyme/Enzyme.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,8 +1780,16 @@ class Enzyme : public ModulePass {
17801780
//&AAPotentialValues::ID,
17811781
};
17821782

1783+
#if LLVM_VERSION_MAJOR >= 15
1784+
AttributorConfig aconfig(CGUpdater);
1785+
aconfig.Allowed = &Allowed;
1786+
aconfig.DeleteFns = false;
1787+
Attributor A(Functions, InfoCache, aconfig);
1788+
#else
1789+
17831790
Attributor A(Functions, InfoCache, CGUpdater, &Allowed,
17841791
/*DeleteFns*/ false);
1792+
#endif
17851793
for (Function *F : Functions) {
17861794
// Populate the Attributor with abstract attribute opportunities in the
17871795
// function and the information cache with IR information.

0 commit comments

Comments
 (0)