freebsd-skq/contrib/llvm/lib
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
..
Analysis Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
AsmParser Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
Bitcode Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
CodeGen Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
DebugInfo Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
ExecutionEngine Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
IR Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
IRReader Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
Linker Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
LTO Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
MC Pull in r196874 from upstream llvm trunk: 2014-02-28 17:12:31 +00:00
Object Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
Option Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
Support Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
TableGen Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
Target Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
Transforms Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00