llvm-6502/include/llvm/MC
Andrew Trick e15c1079cb 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-10 04:39:09 +00:00
..
MCParser Cache AllowAtInIdentifier as class variable in AsmLexer 2013-12-06 23:05:33 +00:00
MachineLocation.h
MCAsmBackend.h
MCAsmInfo.h Correct word hyphenations 2013-12-05 05:44:44 +00:00
MCAsmInfoCOFF.h
MCAsmInfoDarwin.h
MCAsmInfoELF.h
MCAsmLayout.h
MCAssembler.h Move the STT_FILE symbols out of the normal symbol table processing for 2013-10-29 01:06:17 +00:00
MCAtom.h [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MCCodeEmitter.h
MCCodeGenInfo.h Teach ISel not to optimize 'optnone' functions (revised). 2013-11-22 19:11:24 +00:00
MCContext.h Fix a crash that occurs when PWD is invalid. 2013-12-10 04:39:09 +00:00
MCDirectives.h
MCDisassembler.h Export MCDisassembler's SubtargetInfo, to allow architecture-aware disassembly 2013-11-08 16:07:43 +00:00
MCDwarf.h
MCELF.h
MCELFObjectWriter.h
MCELFStreamer.h
MCELFSymbolFlags.h [mc] Fix ELF st_other flag. 2013-12-05 00:34:11 +00:00
MCExpr.h Add support for parsing ARM symbol variants on ELF targets 2013-12-04 22:43:20 +00:00
MCExternalSymbolizer.h
MCFixedLenDisassembler.h
MCFixup.h
MCFixupKindInfo.h
MCFunction.h
MCInst.h
MCInstBuilder.h
MCInstPrinter.h
MCInstrAnalysis.h
MCInstrDesc.h
MCInstrInfo.h
MCInstrItineraries.h
MCLabel.h
MCMachObjectWriter.h
MCMachOSymbolFlags.h
MCModule.h
MCModuleYAML.h
MCObjectDisassembler.h
MCObjectFileInfo.h Use a more direct check for finding out the file type. 2013-12-09 20:26:40 +00:00
MCObjectStreamer.h
MCObjectSymbolizer.h
MCObjectWriter.h
MCRegisterInfo.h
MCRelocationInfo.h
MCSchedule.h Machine model comments. Explain a ProcessorUnit's BufferSize. 2013-12-05 17:55:53 +00:00
MCSection.h
MCSectionCOFF.h Support multiple COFF sections with the same name but different COMDAT. 2013-11-19 19:52:52 +00:00
MCSectionELF.h
MCSectionMachO.h
MCStreamer.h Add a FIXME for making the symbol emission functions const. 2013-12-04 22:04:46 +00:00
MCSubtargetInfo.h
MCSymbol.h Correct word hyphenations 2013-12-05 05:44:44 +00:00
MCSymbolizer.h
MCTargetAsmParser.h
MCValue.h
MCWin64EH.h
MCWinCOFFObjectWriter.h [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
SectionKind.h
SubtargetFeature.h