[llvm-profgen] Error out for unsupported AutoFDO profile generate with probe

Error out instead of siliently generate empty profile when trying to generate AutoFDO profile with probe binary.

Differential Revision: https://reviews.llvm.org/D116508
This commit is contained in:
Wenlei He 2022-01-02 16:25:27 -08:00
parent 3f127d8aaa
commit 9a2120a6e1
1 changed files with 2 additions and 0 deletions

View File

@ -383,6 +383,8 @@ ProfileGenerator::getTopLevelFunctionProfile(StringRef FuncName) {
void ProfileGenerator::generateProfile() {
if (Binary->usePseudoProbes()) {
// TODO: Support probe based profile generation
exitWithError("Probe based profile generation not supported for AutoFDO, "
"consider dropping `--ignore-stack-samples` or adding `--use-dwarf-correlation`.");
} else {
generateLineNumBasedProfile();
}