Fix null reference creation in SelectionDAG constructor.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 20 Aug 2014 21:40:15 +0000 (21:40 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 20 Aug 2014 21:40:15 +0000 (21:40 +0000)
commitfa210acc3b12fc651252de566bb6e3381d9a3097
tree2710f8b6935b36d2dd712097b3c0380aeb90b615
parent145d28e73b6b70c1b4ef04ac8448646ead7a03b3
Fix null reference creation in SelectionDAG constructor.

Store TargetSelectionDAGInfo as a pointer instead of a reference:
getSelectionDAGInfo() may not be implemented for certain backends
(e.g. it's not currently implemented for R600).

This bug is reported by UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216129 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp