aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2022-01-14 10:22:06 -0800
committerErich Keane <erich.keane@intel.com>2022-01-14 10:45:55 -0800
commit2bcba21c8ba95de866ed6333fa5cd29d5d232afe (patch)
treeb66dd9adc15805ac3844bf2f6bdda4c9833ee88c /clang/lib/CodeGen/CodeGenModule.h
parentbdd5b948371293f91c29d9b542d484bb2bbc5c4e (diff)
downloadllvm-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.h3
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,