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 Explicitly request unsigned enum types when desired 2013-09-23 23:26:57 +00:00
MCAsmBackend.h Use the appropriate return type for the compact unwind encoding. 2013-09-11 21:47:57 +00:00
MCAsmInfo.h Correct word hyphenations 2013-12-05 05:44:44 +00:00
MCAsmInfoCOFF.h
MCAsmInfoDarwin.h
MCAsmInfoELF.h Add a MCAsmInfoELF class and factor some code into it. 2013-10-16 01:34:32 +00:00
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 Implements parsing and emitting of .cfi_window_save in MC. 2013-09-26 14:49:40 +00:00
MCELF.h
MCELFObjectWriter.h
MCELFStreamer.h Move .ident handling to MCStreamer. 2013-10-16 01:05:45 +00:00
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 MCFunction.h: Prune \returns to fix a warning in r188881. [-Wdocumentation] 2013-08-21 09:34:22 +00:00
MCInst.h
MCInstBuilder.h
MCInstPrinter.h [MC] AvailableFeatures needs to be a uint64_t to match FeatureBits in MCSubtargetInfo. 2013-09-03 15:03:36 +00:00
MCInstrAnalysis.h
MCInstrDesc.h Somehow this important part of the patch, where I actually check the Mask, 2013-09-12 14:23:19 +00:00
MCInstrInfo.h
MCInstrItineraries.h
MCLabel.h
MCMachObjectWriter.h Move everything depending on Object/MachOFormat.h over to Support/MachO.h. 2013-09-01 04:28:48 +00:00
MCMachOSymbolFlags.h Fix ODR violation. 2013-10-25 03:29:42 +00:00
MCModule.h MC CFG: Split MCBasicBlocks to mirror atom splitting. 2013-08-21 07:28:24 +00:00
MCModuleYAML.h Fix #include guard. 2013-08-25 19:48:46 +00:00
MCObjectDisassembler.h MC CFG: Support disassembly at arbitrary addresses in MCObjectDisassembler. 2013-08-21 07:28:55 +00:00
MCObjectFileInfo.h Use a more direct check for finding out the file type. 2013-12-09 20:26:40 +00:00
MCObjectStreamer.h Add a MCTargetStreamer interface. 2013-10-08 13:08:17 +00:00
MCObjectSymbolizer.h MC: ObjectSymbolizer can now recognize external function stubs. 2013-08-21 07:28:13 +00:00
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 Explicitly request unsigned enum types when desired 2013-09-23 23:26:57 +00:00
MCStreamer.h Add a FIXME for making the symbol emission functions const. 2013-12-04 22:04:46 +00:00
MCSubtargetInfo.h Fix X86 subtarget to not overwrite the autodetected features by calling InitMCProcessorInfo right after detecting them. Instead add a new function that only updates the scheduling model and call that. 2013-09-18 05:54:09 +00:00
MCSymbol.h Correct word hyphenations 2013-12-05 05:44:44 +00:00
MCSymbolizer.h
MCTargetAsmParser.h ARM: allow .thumb_func to be separated from symbol definition 2013-10-25 12:49:50 +00:00
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 MC: Don't assume incoming StringRef's are null terminated. 2013-10-13 22:09:26 +00:00