Add LLVM_ATTRIBUTE_UNUSED to function currently just used in an assert

Fixes break when -Wunused-function is used.