Skip to content

Commit f28d157

Browse files
committed
Update rmake.rs
1 parent c2523c9 commit f28d157

File tree

1 file changed

+2
-2
lines changed
  • tests/run-make/symbol-visibility

1 file changed

+2
-2
lines changed

tests/run-make/symbol-visibility/rmake.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn symbols_check(path: &str, symbol_check_type: SymbolCheckType, exists_once: bo
144144
let mut found: u64 = 0;
145145
for export in file.exports().unwrap() {
146146
let name = std::str::from_utf8(export.name()).unwrap();
147-
if has_symbol(name, symbol_check_type) {
147+
if !name.contains("__imp_") && has_symbol(name, symbol_check_type) {
148148
found += 1;
149149
}
150150
}
@@ -153,7 +153,7 @@ fn symbols_check(path: &str, symbol_check_type: SymbolCheckType, exists_once: bo
153153

154154
fn has_symbol(name: &str, symbol_check_type: SymbolCheckType) -> bool {
155155
if let SymbolCheckType::StrSymbol(expected) = symbol_check_type {
156-
!name.contains("__imp_") && name.contains(expected)
156+
name.contains(expected)
157157
} else {
158158
let regex = regex::Regex::new(r#"_ZN.*h.*E\|_R[a-zA-Z0-9_]+"#).unwrap();
159159
regex.is_match(name)

0 commit comments

Comments
 (0)