Commit Graph

78817 Commits

Author SHA1 Message Date
Reid Kleckner
192537c4f3 [WinEH] Try to make the MachineFunction CFG more accurate
This avoids emitting code for unreachable landingpad blocks that contain
calls to llvm.eh.actions and indirectbr.

It's also a first step towards unifying the SEH and WinEH lowering
codepaths. I'm keeping the old fan-in lowering of SEH around until the
preparation version works well enough that we can switch over without
breaking existing users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235037 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 18:48:15 +00:00
Reid Kleckner
9051b7fc69 Reland "[WinEH] Use the parent function when computing frameescape labels"
Fixed the test by removing extraneous quotes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235028 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 17:47:26 +00:00
Reid Kleckner
034fa881a9 Revert "[WinEH] Use the parent function when computing frameescape labels"
This reverts commit r235025. The test isn't passing yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235027 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 17:43:54 +00:00
Daniel Berlin
7871b86660 Add range iterators for post order and inverse post order. Use them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235026 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 17:41:42 +00:00
Reid Kleckner
7f5438e2ca [WinEH] Use the parent function when computing frameescape labels
Fixes assertions in MC when a local label wasn't defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235025 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 17:32:01 +00:00
Charlie Turner
fdb3720f58 Fix BXJ is undefined in AArch32.
BXJ was incorrectly said to be unsupported in ARMv8-A. It is not
supported in the A64 instruction set, but it is supported in the T32
and A32 instruction sets, because it's listed as an instruction in the
ARM ARM section F7.1.28.

Using SP as an operand to BXJ changed from UNPREDICTABLE to
PREDICTABLE in v8-A. This patch reflects that update as well.

This was found by MCHammer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235024 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 17:28:23 +00:00
Jingyue Wu
d4ceea3837 [SLSR] handle candidate form (B + i * S)
Summary:
With this patch, SLSR may rewrite

S1: X = B + i * S
S2: Y = B + i' * S

to

S2: Y = X + (i' - i) * S

A secondary improvement: if (i' - i) is a power of 2, emit Y as X + (S << log(i' - i)). (S << log(i' -i)) is in a canonical form and thus more likely GVN'ed than (i' - i) * S.

Test Plan: slsr-add.ll

Reviewers: hfinkel, sanjoy, meheff, broune, eliben

Reviewed By: eliben

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 16:46:13 +00:00
Sanjay Patel
e3e5fcab94 [X86] add an exedepfix entry for movq == movlps == movlpd
This is a 1-line patch (with a TODO for AVX because that will affect
even more regression tests) that lets us substitute the appropriate
64-bit store for the float/double/int domains.

It's not clear to me exactly what the difference is between the 0xD6 (MOVPQI2QImr) and 
0x7E (MOVSDto64mr) opcodes, but this is apparently the right choice.

Differential Revision: http://reviews.llvm.org/D8691



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235014 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 15:47:51 +00:00
Sanjay Patel
0332323ab6 [x86] Implement combineRepeatedFPDivisors
Set the transform bar at 2 divisions because the fastest current
x86 FP divider circuit is in SandyBridge / Haswell at 10 cycle
latency (best case) relative to a 5 cycle multiplier. 
So that's the worst case for this transform (no latency win), 
but multiplies are obviously pipelined while divisions are not,
so there's still a big throughput win which we would expect to
show up in typical FP code.

These are the sequences I'm comparing:

  divss   %xmm2, %xmm0
  mulss   %xmm1, %xmm0
  divss   %xmm2, %xmm0

Becomes:

  movss   LCPI0_0(%rip), %xmm3    ## xmm3 = mem[0],zero,zero,zero
  divss   %xmm2, %xmm3
  mulss   %xmm3, %xmm0
  mulss   %xmm1, %xmm0
  mulss   %xmm3, %xmm0

[Ignore for the moment that we don't optimize the chain of 3 multiplies
into 2 independent fmuls followed by 1 dependent fmul...this is the DAG
version of: https://llvm.org/bugs/show_bug.cgi?id=21768 ...if we fix that,
then the transform becomes even more profitable on all targets.]

Differential Revision: http://reviews.llvm.org/D8941



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235012 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 15:22:55 +00:00
Chandler Carruth
ea604d92ef [MBP] Spell the conditions the same way through out this if statement.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235009 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 13:39:42 +00:00
Chandler Carruth
016e977564 [MBP] Sink a comment into the if block to which it pertains. This makes
the content of the comment make much more sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235007 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 13:26:41 +00:00
Chandler Carruth
ec07ff56b9 [MBP] Fix a really misleading typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235006 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 13:19:54 +00:00
Rafael Espindola
50b935707f Write section and section table entries in the same order.
We had two different orders, which has no value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235004 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 13:07:47 +00:00
Daniel Sanders
8232560496 [msp430] Only support the 'm' inline assembly memory constraint. NFC.
Summary:
MSP430 doesn't seem to have any additional constraints. Therefore remove
the target hook.

No functional change intended.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8208


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235003 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 12:51:28 +00:00
Filipe Cabecinhas
f72ee4c275 Revert "Verify sizes when trying to read a VBR"
This reverts r234984 since it seems to break some bots (most of them
seemed arm*-selfhost).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234998 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 11:10:17 +00:00
Toma Tabacu
e3d79bbe9f [mips] [IAS] Refactor the function which checks for the availability of AT. NFC.
Summary:
Refactor MipsAsmParser::getATReg to return an internal register number instead of a register index.
Also change all the int's to unsigned, seeing as the current AT register index is stored as an unsigned in MipsAssemblerOptions.



Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8478

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234996 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 10:48:56 +00:00
Filipe Cabecinhas
4c0055402f Verify sizes when trying to read a VBR
Also added an assert to ReadVBR64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234984 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 08:48:08 +00:00
Yaron Keren
dc374b5eb4 Fix lib\support\Windows/TimeValue.inc(48): warning C4189:
'Error' : local variable is initialized but not referenced.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234982 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 07:45:52 +00:00
Daniel Jasper
058309ba87 Re-apply r234898 and fix tests.
This commit makes LLVM not estimate branch probabilities when doing a
single bit bitmask tests.

The code that originally made me discover this is:

  if ((a & 0x1) == 0x1) {
    ..
  }

In this case we don't actually have any branch probability information
and should not assume to have any. LLVM transforms this into:

  %and = and i32 %a, 1
  %tobool = icmp eq i32 %and, 0

So, in this case, the result of a bitwise and is compared against 0,
but nevertheless, we should not assume to have probability
information.

CodeGen/ARM/2013-10-11-select-stalls.ll started failing because the
changed probabilities changed the results of
ARMBaseInstrInfo::isProfitableToIfCvt() and led to an Ifcvt of the
diamond in the test. AFAICT, the test was never meant to test this and
thus changing the test input slightly to not change the probabilities
seems like the best way to preserve the meaning of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234979 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 06:24:07 +00:00
Lang Hames
29da637826 [RuntimeDyld] Add casts to make delta computation 64-bit.
Hopefully this will fix the i686/msvc build failure described at:
http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/803



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234977 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 04:46:01 +00:00
Lang Hames
a01f355245 [RuntimeDyld] Make sure we emit MachO __eh_frame and __gcc_except_tab sections,
even if there are no references to them in the code.

This allows exceptions thrown from JIT'd code to be caught by the JIT itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234975 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 03:39:22 +00:00
Duncan P. N. Exon Smith
8d61ee9e7d uselistorder: Remove the global bits
Remove all the global bits to do with preserving use-list order by
moving the `cl::opt`s to the individual tools that want them.  There's a
minor functionality change to `libLTO`, in that you can't send in
`-preserve-bc-uselistorder=false`, but making that bit settable (if it's
worth doing) should be through explicit LTO API.

As a drive-by fix, I removed some includes of `UseListOrder.h` that were
made unnecessary by recent commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234973 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 03:14:06 +00:00
Alexei Starovoitov
49b5acf658 [bpf] fix build
fix build due to refactoring in DIL/MDL and raw_pwrite_stream

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234971 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 02:48:57 +00:00
Duncan P. N. Exon Smith
2c7f24d654 uselistorder: Pull the bit through PrintModulePass
Now the callers of `PrintModulePass()` (etc.) that care about use-list
order in assembly pass in the flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234969 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 02:38:06 +00:00
Duncan P. N. Exon Smith
8b376eb892 uselistorder: Pull the assembly bit up out of the printer
Pull the `-preserve-ll-uselistorder` bit up through all the callers of
`Module::print()`.  I converted callers of `operator<<` to
`Module::print()` where necessary to pull the bit through.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234968 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 02:12:41 +00:00
Duncan P. N. Exon Smith
c9d5dea0fe uselistorder: Start pulling out -preserve-ll-uselistorder
For consistency, start pulling out `-preserve-ll-uselistorder`.  I'll
drop the global state for both eventually.  This pulls it up to
`Module::print()` (but not past there).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 01:36:30 +00:00
Richard Trieu
64b905a58d Change range-based for-loops to be -Wrange-loop-analysis clean.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234963 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 01:21:15 +00:00
Duncan P. N. Exon Smith
e005d71e4b uselistorder: Pull bit through BitcodeWriterPass
Now the callers of `BitcodeWriterPass` decide whether or not to preserve
bitcode use-list order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234959 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 00:34:24 +00:00
Duncan P. N. Exon Smith
657aad675a uselistorder: Pull the bit through WriteToBitcodFile()
Change the callers of `WriteToBitcodeFile()` to pass `true` or
`shouldPreserveBitcodeUseListOrder()` explicitly.  I left the callers
that want to send `false` alone.

I'll keep pushing the bit higher until hopefully I can delete the global
`cl::opt` entirely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234957 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 00:10:50 +00:00
Duncan P. N. Exon Smith
d01ee74ffa uselistorder: Thread bit through ValueEnumerator
Canonicalize access to whether to preserve use-list order in bitcode on
a `bool` stored in `ValueEnumerator`.  Next step, expose this as a
`bool` through `WriteBitcodeToFile()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234956 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 23:45:11 +00:00
Rafael Espindola
83ed6b7814 Use the ability to pwrite to simplify the ELF writer.
Now we don't have to do 2 synchronized passes to compute offsets and then
write the file.

This also includes a fix for the corner case of seeking in /dev/null. It
is not an error, but on some systems (Linux) the returned offset is
always 0. An error is signaled by returning -1. This is checked by
the existing tests now that "clang -o /dev/null ..." seeks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234952 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 22:54:16 +00:00
Rafael Espindola
c98092e28d Use raw_pwrite_stream in the object writer/streamer.
The ELF object writer will take advantage of that in the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234950 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 22:14:34 +00:00
Reid Kleckner
f49f1560d2 [WinEH] Avoid emitting xdata tables twice for cleanups
Since adding invokes of llvm.donothing to cleanups, we come here now,
and trivial EH cleanup usage from clang fails to compile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234948 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 21:42:36 +00:00
Ed Maste
ffc045ab80 Correct 'teh' and other typos / repeated words.
Patch by Eitan Adler.

Differential Revision:	http://reviews.llvm.org/D8514


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234939 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 20:52:58 +00:00
Reid Kleckner
ecc4595ce4 [Inliner] Don't inline functions with frameescape calls
Inlining such intrinsics is very difficult, since you need to
simultaneously transform many calls to llvm.framerecover and potentially
duplicate the functions containing them.  Normally this intrinsic isn't
added until EH preparation, which is part of the backend pass pipeline
after inlining.  However, if it were to get fed through the inliner,
this change will ensure that it doesn't break the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234937 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 20:38:14 +00:00
Duncan P. N. Exon Smith
d044549557 IR: Set -preserve-bc-uselistorder=false by default
But keep it on by default in `llvm-as`, `opt`, `bugpoint`, `llvm-link`,
`llvm-extract`, and `LTOCodeGenerator`.  Part of PR5680.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234921 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 18:33:00 +00:00
Duncan P. N. Exon Smith
8922be32e9 IR: Rename 'use-list-order' options to 'uselistorder'
Rename options to be consistent with the name of `verify-uselistorder`,
and update `DEBUG_TYPE` (etc.) to be consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 18:19:27 +00:00
David Blaikie
8b37471825 DebugInfo: Pubnames: Do not include variable declarations in pubnames
This causes badness for GDB which expects to find a definition in any
compile_unit that has an entry for the variable in its pubnames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234915 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 18:08:25 +00:00
Lang Hames
1e3aa641b0 [RuntimeDyld] Make SectionEntry's Name field a std::string.
StringRef is unsafe here, since SectionEntry instances can outlive the
ObjectFile instances they are created from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234910 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 17:13:10 +00:00
Rafael Espindola
091be7b530 Revert "The code that originally made me discover this is:"
This reverts commit r234898.
CodeGen/ARM/2013-10-11-select-stalls.ll was faling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 15:56:33 +00:00
Chad Rosier
2fbccf6972 Improve RefreshCallGraph to remove invalid call graph edge.
With commit r219944, InstCombine can now turn a sqrtl into a llvm.fabs.f64.
The call graph edge originally representing the call to sqrtl becomes invalid.
This patch modifies CGPassManager::RefreshCallGraph() to remove the invalid
call graph edge, which can triggers an assert in
CallGraphNode::addCalledFunction().

Phabricator Review: http://reviews.llvm.org/D7705
Patch by Lawrence Hu <lawrence@codeaurora.org>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234902 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 15:52:57 +00:00
Alexander Kornienko
6f422b364d Refactor: Simplify boolean expressions in ARM target
Simplify boolean expressions using `true` and `false` with `clang-tidy`

http://reviews.llvm.org/D8524

Patch by Richard Thomson!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234901 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 15:32:58 +00:00
Daniel Jasper
7025d248eb The code that originally made me discover this is:
if ((a & 0x1) == 0x1) {
    ..
  }

In this case we don't actually have any branch probability information and
should not assume to have any. LLVM transforms this into:

  %and = and i32 %a, 1
  %tobool = icmp eq i32 %and, 0

So, in this case, the result of a bitwise and is compared against 0,
but nevertheless, we should not assume to have probability
information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 15:20:37 +00:00
Bradley Smith
d87c77c0e8 [AArch64] Allow non-standard INS/DUP encodings
The ARMv8 ARMARM states that for these instructions in A64 state:

  "Unspecified bits in "imm5" are ignored but should be set to zero by an assembler.", (imm4 for INS).

Make the disassembler accept any encoding with these ignored bits set to 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 15:07:26 +00:00
Rafael Espindola
661ed85834 Add raw_pwrite_stream type.
This is a raw_ostream that also supports pwrite.
I will be used in a sec.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 15:00:34 +00:00
Tom Stellard
71fcd2d4d8 R600/SI: Fix verifier error caused by SIAnnotateControlFlow
This pass will always try to insert llvm.SI.ifbreak intrinsics
in the same block that its conditional value is computed in.  This is
a problem when conditions for breaks or continue are computed outside
of the loop, because the llvm.SI.ifbreak intrinsic ends up being inserted
outside of the loop.

This patch fixes this problem by inserting the llvm.SI.ifbreak
intrinsics in the loop header when the condition is computed outside
the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234891 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 14:36:45 +00:00
Filipe Cabecinhas
9a1030a4d6 Error out of ParseBitcodeInto(Module*) if we haven't read a Module
Summary:
Without this check the following case failed:

Skip a SubBlock which is not a MODULE_BLOCK_ID nor a BLOCKINFO_BLOCK_ID
Got to end of file

TheModule would still be == nullptr, and we would subsequentially fail
when materializing the Module (assert at the start of
BitcodeReader::MaterializeModule).

Bug found with AFL.

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9014

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234887 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 14:07:15 +00:00
Petar Jovanovic
01b026b023 Re-enable target-specific relocation table sorting and use it for Mips
Some targets (ie. Mips) have additional rules for ordering the relocation
table entries. Allow them to override generic sortRelocs(), which sorts
entries by Offset.
Then override this function for Mips, to emit HI16 and GOT16 relocations
against the local symbol in pair with the corresponding LO16 relocation.

Patch by Vladimir Stefanovic.

Differential Revision: http://reviews.llvm.org/D7414


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234883 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 13:23:34 +00:00
Daniel Jasper
6c456f0351 [MachineLICM] Use newer model of register pressure sets.
TargetRegisterInfo::getRegPressureLimit has a note that it is an old
model that relies on manually entered classes. Using the newer model of
register pressure sets seems more appropriate. We might eventually even
switch to lib/CodeGen/RegisterPressure.cpp, but we should probably do
incremental changes here.

Using the newer model also makes it easier to take regmasks into account
which is necessary to fix llvm.org/PR23143. I am currently also
preparing a patch for that, but would like to do this switch
independently.

Review: http://reviews.llvm.org/D8986

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234880 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 11:56:25 +00:00
Anders Waldenborg
6ee10307c0 Fix crash in DebugInfoFinder when adding a module with forward declared composite type
The testcase that is included in the patch caused a crash when doing DebugInfoFinder::processModule
on the module due to DCT->getElements() returning nullptr in DebugInfoFinder::processType.

By doing "DCT->getElements()" instead of "DCT->getElements()->operands()" one gets a DIArray
instead of a raw MDTuple. The former has code to handle null as a 0-element array and
therefore avoids the crash.

Differential Revision: http://reviews.llvm.org/D9008



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234875 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 09:18:17 +00:00