Add another assert to cpu-dispatch emission to help track down a tough

to repro error.

As mentioned yesterday, I've got a problem that I can only reproduce on
Godbolt (none of the build configs on my local machine!), so this is at
least somewhat usable until I figure out a cause.
This commit is contained in:
Erich Keane 2022-01-13 06:52:58 -08:00
parent 0c6c588a9b
commit b699e8b11a
1 changed files with 2 additions and 1 deletions

View File

@ -3479,6 +3479,7 @@ void CodeGenModule::emitMultiVersionFunctions() {
void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) {
const auto *FD = cast<FunctionDecl>(GD.getDecl());
assert(FD && "Not a FunctionDecl?");
assert(FD->isCPUDispatchMultiVersion() && "Not a multiversion function?");
const auto *DD = FD->getAttr<CPUDispatchAttr>();
assert(DD && "Not a cpu_dispatch Function?");
llvm::Type *DeclTy = getTypes().ConvertType(FD->getType());
@ -3498,7 +3499,7 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) {
Context.getTargetAddressSpace(FD->getType())),
false);
assert(ResolverName.endswith(".resolver") &&
"CPUDispatch IFunc resolver doesn't end with .resolver?");
"CPUDispatch IFunc resolver doesn't end with .resolver??");
}
else {
ResolverType = DeclTy;