Skip to content

Commit 26a9366

Browse files
committed
In LLVM 3.7 BasicAA always returns true from doInitialization even though it never modifies the IR.
1 parent 3fcdd36 commit 26a9366

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/all/test_passes.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,16 @@ fn test_pass_manager_builder() {
112112
builder.position_at_end(&entry);
113113
builder.build_return(None);
114114

115+
#[cfg(not(feature = "llvm3-7"))]
116+
assert!(!fn_pass_manager.initialize());
117+
#[cfg(feature = "llvm3-7")]
118+
fn_pass_manager.initialize();
119+
115120
// TODO: Test with actual changes? Would be true in that case
116121
// REVIEW: Segfaults in 4.0
117122
#[cfg(not(feature = "llvm4-0"))]
118123
assert!(!fn_pass_manager.run_on(&fn_value));
119124

120-
assert!(!fn_pass_manager.initialize());
121125
assert!(!fn_pass_manager.finalize());
122126

123127
let module_pass_manager = PassManager::create(());

0 commit comments

Comments
 (0)