diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-10-31 18:19:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 18:19:44 -0500 |
commit | 63fc240831908fcbe0594275eafe4c5ccf4933d5 (patch) | |
tree | c937c81a797705e19fa3a665dfe85c3cab57ee5c | |
parent | f967825cab91e2fbaae348ecf123171c53f949dd (diff) | |
parent | 9eb1f76ffd73e350ee6478aa2677c29affc5d0ff (diff) |
Auto merge of #179 - emilio:errors, r=fitzgen
Fix empty mangling handling on OSX
This has hit @Manishearth today.
r? @fitzgen
-rw-r--r-- | src/ir/function.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ir/function.rs b/src/ir/function.rs index fc2a7110..e9fd4a25 100644 --- a/src/ir/function.rs +++ b/src/ir/function.rs @@ -98,13 +98,16 @@ pub fn cursor_mangling(cursor: &clang::Cursor) -> Option<String> { } let mut mangling = cursor.mangling(); + if mangling.is_empty() { + return None; + } // Try to undo backend linkage munging (prepended _, generally) if cfg!(target_os = "macos") { mangling.remove(0); } - if mangling.is_empty() { None } else { Some(mangling) } + Some(mangling) } impl FunctionSig { |