mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-26 10:29:36 +00:00
This commit translates the line and column numbers for LLVM IR errors from the numbers in the YAML block scalar to the numbers in the MIR file so that the MIRParser users can report LLVM IR errors with the correct line and column numbers. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10108 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238576 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
569 B
YAML
23 lines
569 B
YAML
# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
|
|
# This test ensures an error is reported if the embedded LLVM IR contains an
|
|
# error.
|
|
|
|
--- |
|
|
|
|
; CHECK: [[@LINE+3]]:15: error: use of undefined value '%a'
|
|
define i32 @foo(i32 %x, i32 %y) {
|
|
%z = alloca i32, align 4
|
|
store i32 %a, i32* %z, align 4
|
|
br label %Test
|
|
Test:
|
|
%m = load i32, i32* %z, align 4
|
|
%cond = icmp eq i32 %y, %m
|
|
br i1 %cond, label %IfEqual, label %IfUnequal
|
|
IfEqual:
|
|
ret i32 1
|
|
IfUnequal:
|
|
ret i32 0
|
|
}
|
|
|
|
...
|