[MCA] Don't assume that createMCInstrAnalysis() always returns a valid pointer.

Class InstrBuilder wrongly assumed that llvm targets were always able to return
a non-null pointer when createMCInstrAnalysis() was called on them.
This was causing crashes when simulating executions for targets that don't
provide an MCInstrAnalysis object.
This patch fixes the issue by making MCInstrAnalysis optional.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349352 91177308-0d34-0410-b5e6-96231b3b80d8
5 files changed