diff options
author | Erich Keane <erich.keane@intel.com> | 2022-01-14 10:22:06 -0800 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2022-01-14 10:45:55 -0800 |
commit | 2bcba21c8ba95de866ed6333fa5cd29d5d232afe (patch) | |
tree | b66dd9adc15805ac3844bf2f6bdda4c9833ee88c /clang/lib/CodeGen/CodeGenModule.h | |
parent | bdd5b948371293f91c29d9b542d484bb2bbc5c4e (diff) | |
download | llvm-2bcba21c8ba95de866ed6333fa5cd29d5d232afe.zip llvm-2bcba21c8ba95de866ed6333fa5cd29d5d232afe.tar.gz llvm-2bcba21c8ba95de866ed6333fa5cd29d5d232afe.tar.bz2 |
[CPU-Dispatch] Make sure Dispatch names get updated if previously mangled
Cases where there is a mangling of a cpu-dispatch/cpu-specific function
before the function becomes 'multiversion' (such as a member function)
causes the wrong name to be emitted for one of the variants/resolver,
since the name is cached. Make sure we invalidate the cache in
cpu-dispatch/cpu-specific modes, like we previously did for just target
multiversioning.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index f18de6e..9ae9d62 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1468,7 +1468,8 @@ private: llvm::Constant *GetOrCreateMultiVersionResolver(GlobalDecl GD, llvm::Type *DeclTy, const FunctionDecl *FD); - void UpdateMultiVersionNames(GlobalDecl GD, const FunctionDecl *FD); + void UpdateMultiVersionNames(GlobalDecl GD, const FunctionDecl *FD, + StringRef &CurName); llvm::Constant * GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty, LangAS AddrSpace, |