diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-12-12 15:33:18 -0500 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-12-12 15:48:33 -0500 |
commit | 5ad52587ec182f03636649e2cb66a0a4d9ffeab2 (patch) | |
tree | 53e0b72e47f11fee9391b4d2397faf305c3d545b /clang/lib/CodeGen/CGOpenMPRuntime.cpp | |
parent | 8963332c3327daa652ba3e26d35f9109b6991985 (diff) | |
download | bcm5719-llvm-5ad52587ec182f03636649e2cb66a0a4d9ffeab2.tar.gz bcm5719-llvm-5ad52587ec182f03636649e2cb66a0a4d9ffeab2.zip |
[OPENMP50]Fix possible conflict when emitting an alias for the functions
in declare variant.
If the types of the fnction are not equal, but match, at the codegen
thei may have different types. This may lead to compiler crash.
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index e3e9bd4284c..1aae18b4504 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1280,7 +1280,7 @@ bool CGOpenMPRuntime::tryEmitDeclareVariant(const GlobalDecl &NewGD, llvm::GlobalValue *Addr = CGM.GetGlobalValue(NewMangledName); if (Addr && !Addr->isDeclaration()) { const auto *D = cast<FunctionDecl>(OldGD.getDecl()); - const CGFunctionInfo &FI = CGM.getTypes().arrangeGlobalDeclaration(OldGD); + const CGFunctionInfo &FI = CGM.getTypes().arrangeGlobalDeclaration(NewGD); llvm::Type *DeclTy = CGM.getTypes().GetFunctionType(FI); // Create a reference to the named value. This ensures that it is emitted |