Skip to content

Commit a326bd6

Browse files
committed
Fixed pass manager tests in older versions
1 parent b5d34a1 commit a326bd6

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/passes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ impl<T: PassManagerSubType> PassManager<T> {
234234
}
235235
}
236236

237-
/// This method returns true if any of the passes modified the module and
238-
/// false otherwise.
237+
/// This method returns true if any of the passes modified the function or module
238+
/// and false otherwise.
239239
pub fn run_on(&self, input: &T) -> bool {
240240
unsafe {
241241
input.run_in_pass_manager(self)

tests/all/test_passes.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ fn test_pass_manager_builder() {
131131

132132
let module2 = module.clone();
133133

134-
// TODOC: Seems to return true in 3.7, 6.0, & 7.0 even though no changes were made.
135-
// In 3.6, 3.8, & 3.9 it returns false. Seems like a LLVM bug?
134+
// TODOC: In 3.6, 3.8, & 3.9 it returns false. Seems like a LLVM bug?
136135
#[cfg(not(any(feature = "llvm3-7", feature = "llvm6-0", feature = "llvm7-0")))]
137136
assert!(!module_pass_manager.run_on(&module));
138137
#[cfg(any(feature = "llvm3-7", feature = "llvm6-0", feature = "llvm7-0"))]
@@ -142,10 +141,6 @@ fn test_pass_manager_builder() {
142141

143142
pass_manager_builder.populate_lto_pass_manager(&lto_pass_manager, false, false);
144143

145-
// See above note on version differences
146-
#[cfg(not(any(feature = "llvm3-7", feature = "llvm6-0", feature = "llvm7-0")))]
147-
assert!(!lto_pass_manager.run_on(&module2));
148-
#[cfg(any(feature = "llvm3-7", feature = "llvm6-0", feature = "llvm7-0"))]
149144
assert!(lto_pass_manager.run_on(&module2));
150145
}
151146

0 commit comments

Comments
 (0)