
Normally SampleContext does not allow using an empty StirngRef to construct an object, this is to prevent bugs reading the profile. However empty names may be emitted by a function which its name is intentionally set to empty, or a bug in the remapper that returns an empty string. Regardless, converting it to FunctionId first will prevent the assert, and that assert check is unnecessary, which will be addressed in another patch
9 lines
240 B
LLVM
9 lines
240 B
LLVM
; This test should not crash.
|
|
; RUN: opt %s -passes=sample-profile -sample-profile-file=%S/Inputs/remap.prof -sample-profile-remapping-file=%S/Inputs/remap.map
|
|
|
|
define void @foo() #0 {
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { "use-sample-profile" }
|