llvm::collectPGOFuncNameStrings

Serialize referenced PGO function-name variables into Result.

Synopsis

Declared in <llvm/ProfileData/InstrProf.h>

Error
collectPGOFuncNameStrings(
    ArrayRef<GlobalVariable*> NameVars,
    std::string& Result,
    bool doCompression = true);

Description

Each element of NameVars holds a function's PGO name string (see createPGOFuncNameVar). The output format matches collectGlobalObjectNameStrings.

Return Value

Success, or an error if serialization or compression fails.

Parameters

NameDescription
NameVarsReferenced PGO function-name globals.
ResultSerialized output string.
doCompressionWhether to zlib-compress the payload.