A symbol being redefined as a label is something that can happen as a result of ordinary input, so it shouldn't cause a fatal error. Also adjust the error message to match the one you get when a symbol is redefined as a variable. Differential Revision: https://reviews.llvm.org/D98181
10 lines
288 B
LLVM
10 lines
288 B
LLVM
; RUN: not llc -mtriple=x86_64-unknown-unknown %s -o - 2>&1 | FileCheck %s
|
|
|
|
; CHECK: <unknown>:0: error: symbol 'fn' is already defined
|
|
define void @fn() section "fn" {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: <unknown>:0: error: symbol 'var' is already defined
|
|
@var = global i32 0, section "var", align 4
|