
Typically names longer than -non-global-value-max-name-size will just get renamed if there is a collision after truncating. This is fine since we typically don't reference Values by name. However LLParser does reference Values by name, so report an error when that happens, otherwise weird issues can crop up if there are name collisions (e.g. verifier issues with the changed test case because we end up reusing the same block for `testz` and `testa`). Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D145282
16 lines
254 B
LLVM
16 lines
254 B
LLVM
; RUN: opt < %s -S -non-global-value-max-name-size=5
|
|
; RUN: not opt < %s -S -non-global-value-max-name-size=4 2>&1 | FileCheck %s
|
|
|
|
; CHECK: name is too long
|
|
|
|
define void @f() {
|
|
bb0:
|
|
br label %testz
|
|
|
|
testz:
|
|
br label %testa
|
|
|
|
testa:
|
|
br label %testz
|
|
}
|