mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-24 05:23:45 +02:00
2e08d769c3
This commit connects the machine function analysis pass (which creates machine functions) to the MIR parser, which will initialize the machine functions with the state from the MIR file and reconstruct the machine IR. This commit introduces a new interface called 'MachineFunctionInitializer', which can be used to provide custom initialization for the machine functions. This commit also introduces a new diagnostic class called 'DiagnosticInfoMIRParser' which is used for MIR parsing errors. This commit modifies the default diagnostic handling in LLVMContext - now the the diagnostics are printed directly into llvm::errs() so that the MIR parsing errors can be printed with colours. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9928 llvm-svn: 239753
23 lines
411 B
YAML
23 lines
411 B
YAML
# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
|
|
# This test ensures that an error is reported when a machine function doesn't
|
|
# have a name attribute.
|
|
|
|
--- |
|
|
|
|
define i32 @foo() {
|
|
ret i32 0
|
|
}
|
|
|
|
define i32 @bar() {
|
|
ret i32 0
|
|
}
|
|
|
|
...
|
|
---
|
|
# CHECK: [[@LINE+1]]:1: missing required key 'name'
|
|
nme: foo
|
|
...
|
|
---
|
|
name: bar
|
|
...
|