HomeFreeBSD

Merge commit 21e5e1724b75 from llvm git:

Description

Merge commit 21e5e1724b75 from llvm git:

getMainExecutable: Fix hand-rolled AT_EXECPATH for older FreeBSD

Once we hit AT_NULL, we need to bail out of the loop; not just the
enclosing switch.  This fixes basic usage (e.g. `cc --version`) when
AT_EXECPATH isn't present on older branches (e.g. under
emu-user-static, at the moment), where we would previously run off
the end of ::environ.

Patch By: kevans

Reviewed By: arichardson

Differential Revision:  https://reviews.llvm.org/D79239

MFC after: 3 days

Details

Provenance
emasteAuthored on
Parents
rS360800: MFC r360231:
Branches
Unknown
Tags
Unknown