Skip to content

Commit

Permalink
[llvm-to-ar] Treat _errno as __errno_location
Browse files Browse the repository at this point in the history
`_errno` is yet another alias for the errno location function.
  • Loading branch information
arthaud committed Apr 8, 2019
1 parent d979046 commit e192eb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/llvm/src/import/library_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ ar::Function* LibraryFunctionImporter::function(llvm::StringRef name) {
return this->_bundle->intrinsic_function(ar::Intrinsic::LibcAbort);
}
// <errno.h>
if (name == "__errno_location" || name == "__errno" || name == "__error") {
if (name == "__errno_location" || name == "__errno" || name == "_errno" ||
name == "__error") {
return this->_bundle->intrinsic_function(
ar::Intrinsic::LibcErrnoLocation);
}
Expand Down

0 comments on commit e192eb2

Please sign in to comment.