diff options
author | Ed Maste <emaste@FreeBSD.org> | 2020-05-07 14:57:11 -0400 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2020-05-07 17:05:17 -0400 |
commit | 21e5e1724b75a4fc66ddb8b7e31b7c85b8f9c67b (patch) | |
tree | 89a0cfae17d930117f421913aea16b9000bb32e3 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | df73e36dc6ffd2ede500189b075f7ac52794b3ad (diff) | |
download | llvm-21e5e1724b75a4fc66ddb8b7e31b7c85b8f9c67b.zip llvm-21e5e1724b75a4fc66ddb8b7e31b7c85b8f9c67b.tar.gz llvm-21e5e1724b75a4fc66ddb8b7e31b7c85b8f9c67b.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions