Pass the computed magic to createBinary and createObjectFile if available.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 22 Jan 2014 16:04:52 +0000 (16:04 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 22 Jan 2014 16:04:52 +0000 (16:04 +0000)
commit2edc3a6b8df2962f4bcc769fd2606e4f6c36fb06
tree4ad876aa8eec3475f0eeb6dc88b45cc2c85b6187
parent929b0fb893f2c794a450975d802c0b39752effc0
Pass the computed magic to createBinary and createObjectFile if available.

identify_magic is not free, so we should avoid calling it twice. The argument
also makes it cheap for createBinary to just forward to createObjectFile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199813 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/Binary.h
include/llvm/Object/ObjectFile.h
lib/Object/Binary.cpp
lib/Object/ObjectFile.cpp
tools/llvm-nm/llvm-nm.cpp