1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/contrib/llvm
Dimitry Andric a1509b8a0e Pull in r196874 from upstream llvm trunk:
Fix a crash that occurs when PWD is invalid.

  MCJIT needs to be able to run in hostile environments, even when PWD
  is invalid. There's no need to crash MCJIT in this case.

  The obvious fix is to simply leave MCContext's CompilationDir empty
  when PWD can't be determined. This way, MCJIT clients,
  and other clients that link with LLVM don't need a valid working directory.

  If we do want to guarantee valid CompilationDir, that should be done
  only for clients of getCompilationDir(). This is as simple as checking
  for an empty string.

  The only current use of getCompilationDir is EmitGenDwarfInfo, which
  won't conceivably run with an invalid working dir. However, in the
  purely hypothetically and untestable case that this happens, the
  AT_comp_dir will be omitted from the compilation_unit DIE.

This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.

Reported by:	decke
MFC after:	2 weeks
X-MFC-With:	r261991
2014-02-28 17:12:31 +00:00
..
include Pull in r196874 from upstream llvm trunk: 2014-02-28 17:12:31 +00:00
lib Pull in r196874 from upstream llvm trunk: 2014-02-28 17:12:31 +00:00
tools Update LLDB snapshot to upstream r202189 2014-02-26 16:09:54 +00:00
utils/TableGen Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
LICENSE.TXT Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00