MIR Serialization: Create dummy functions when the MIR file doesn't have LLVM IR.
authorAlex Lorenz <arphaman@gmail.com>
Mon, 15 Jun 2015 23:07:38 +0000 (23:07 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 15 Jun 2015 23:07:38 +0000 (23:07 +0000)
commit034945e8fe70ce5e53de2cfd52abf9f29d9125cc
treec54be91a1eff2c57af3de4357d781f3d8a6521e7
parent185789e9a04624d50638f1eb04661672b7323e9c
MIR Serialization: Create dummy functions when the MIR file doesn't have LLVM IR.

This commit creates a dummy LLVM IR function with one basic block and an unreachable
instruction for each parsed machine function when the MIR file doesn't have LLVM IR.
This change is required as the machine function analysis pass creates machine
functions only for the functions that are defined in the current LLVM module.

Reviewers: Duncan P. N. Exon Smith

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239778 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MIRParser/MIRParser.cpp
test/CodeGen/MIR/llvmIRMissing.mir