llvm-project/llvm/test
Duncan P. N. Exon Smith ad6eb127c9 Bitcode: Stop assuming non-null fields
When writing the bitcode serialization for the new debug info hierarchy,
I assumed two fields would never be null.

Drop that assumption, since it's brittle (and crashes the
`BitcodeWriter` if wrong), and is a check better left for the verifier
anyway.  (No need for a bitcode upgrade here, since the new hierarchy is
still not in place.)

The fields in question are `MDCompileUnit::getFile()` and
`MDDerivedType::getBaseType()`, the latter of which isn't null in
test/Transforms/Mem2Reg/ConvertDebugInfo2.ll (see !14, a pointer to
nothing).  While the testcase might have bitrotted, there's no reason
for the bitcode format to rely on non-null for metadata operands.

This also fixes a bug in `AsmWriter` where if the `file:` is null it
isn't emitted (caught by the double-round trip in the testcase I'm
adding) -- this is a required field in `LLParser`.

I'll circle back to ConvertDebugInfo2.  Once the specialized nodes are
in place, I'll be trying to turn the debug info verifier back on by
default (in the newer module pass form committed r206300) and throwing
more logic in there.  If the testcase has bitrotted (as opposed to me
not understanding the schema correctly) I'll fix it then.

llvm-svn: 229960
2015-02-20 03:17:58 +00:00
..
Analysis [LoopAccesses] Add -analyze support 2015-02-19 19:15:19 +00:00
Assembler Bitcode: Stop assuming non-null fields 2015-02-20 03:17:58 +00:00
Bindings [OCaml] Add Llvm.build_empty_phi. 2015-02-06 13:42:03 +00:00
Bitcode [Bitcode reader] Fix a few assertions when reading invalid files 2015-02-16 00:03:11 +00:00
BugPoint IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
CodeGen [x86] Make the new vector shuffle legality test on by default, which 2015-02-20 03:05:47 +00:00
DebugInfo DebugInfo: Match Name and DisplayName in testcase 2015-02-19 23:48:17 +00:00
ExecutionEngine Make frem.ll flush after calling printf. 2015-02-18 19:32:28 +00:00
Feature Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
FileCheck
Instrumentation [sanitizer] fix a test broken by r229940 2015-02-20 02:12:25 +00:00
Integer
JitListener IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
LTO Introduce Target::createNullTargetStreamer and use it from IRObjectFile. 2015-02-19 00:45:02 +00:00
Linker Add run line that was missing in r228999. 2015-02-13 16:00:03 +00:00
MC MC: Allow multiple comma-separated expressions on the .uleb128 directive. 2015-02-19 20:24:04 +00:00
Object [Object] Support reading 64-bit MIPS ELF archives 2015-02-17 18:54:22 +00:00
Other Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
SymbolRewriter SymbolRewriter: allow rewriting with comdats 2015-01-27 22:57:39 +00:00
TableGen
Transforms [InstCombine] Remove unnecessary variable indexing into single-element arrays 2015-02-20 03:05:53 +00:00
Unit
Verifier Implement invoke statepoint verification. 2015-02-19 11:28:47 +00:00
YAMLParser
tools [Objdump] Fixing crash when printing symbols in ELF sections with special types. 2015-02-18 23:00:22 +00:00
.clang-format
CMakeLists.txt Back out two accidental changes that snuck in with r229245. Sorry these 2015-02-14 09:05:58 +00:00
Makefile [gold] Consolidate the gold plugin options and actually search for 2015-02-14 09:43:57 +00:00
Makefile.tests
TestRunner.sh
lit.cfg [gold] Consolidate the gold plugin options and actually search for 2015-02-14 09:43:57 +00:00
lit.site.cfg.in [gold] Consolidate the gold plugin options and actually search for 2015-02-14 09:43:57 +00:00