aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-09-22 05:37:12 +0000
committerCraig Topper <craig.topper@gmail.com>2015-09-22 05:37:12 +0000
commit859adfaf5e31cfe8dc6434775531527941e3e832 (patch)
treeed786d85e70b2db77f844846905bad144141c8a1 /llvm/lib/Object/MachOObjectFile.cpp
parentadb99821bcf487d0baf4058ad676df85b11cf37e (diff)
downloadllvm-859adfaf5e31cfe8dc6434775531527941e3e832.zip
llvm-859adfaf5e31cfe8dc6434775531527941e3e832.tar.gz
llvm-859adfaf5e31cfe8dc6434775531527941e3e832.tar.bz2
Use makeArrayRef and None to simplify some code in a tablegen register info file. Additionally const correct a couple static array.
Previously the code added an extra nullptr entry to a static array and then created an ArrayRef with a size one less than the static array. If there were no other entries the array would just contain the nullptr and the ArrayRef would be crated with size 0. Instead, put the right number of entries in the array and explicitly emit 'None' if the size would be 0. This allows the static array constructor of makeArrayRef to be used. llvm-svn: 248244
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions