jdoerfert created this revision.
jdoerfert added reviewers: jhuber6, fghanim.
Herald added subscribers: sstefan1, guansong, bollu, yaxunl.
Herald added a project: clang.
We should replace the uses of `QualType IdentQTy` with DataLayout
queries encapsulated in a helper (inside `llvm::omp::types`)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80735
Files:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/CodeGen/CGOpenMPRuntime.h
Index: clang/lib/CodeGen/CGOpenMPRuntime.h
===================================================================
--- clang/lib/CodeGen/CGOpenMPRuntime.h
+++ clang/lib/CodeGen/CGOpenMPRuntime.h
@@ -378,7 +378,6 @@
Address getOrCreateDefaultLocation(unsigned Flags);
QualType IdentQTy;
- llvm::StructType *IdentTy = nullptr;
/// Map for SourceLocation and OpenMP runtime library debug locations.
typedef llvm::DenseMap<unsigned, llvm::Value *> OpenMPDebugLocMapTy;
OpenMPDebugLocMapTy OpenMPDebugLocMap;
Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===================================================================
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -1289,7 +1289,7 @@
addFieldToRecordDecl(C, RD, C.VoidPtrTy);
RD->completeDefinition();
IdentQTy = C.getRecordType(RD);
- IdentTy = CGM.getTypes().ConvertRecordDeclType(RD);
+ llvm::omp::types::initializeTypes(CGM.getModule());
KmpCriticalNameTy = llvm::ArrayType::get(CGM.Int32Ty, /*NumElements*/ 8);
loadOffloadInfoMetadata();
@@ -1799,7 +1799,7 @@
}
llvm::Type *CGOpenMPRuntime::getIdentTyPointerTy() {
- return IdentTy->getPointerTo();
+ return llvm::omp::types::IdentPtr;
}
llvm::Type *CGOpenMPRuntime::getKmpc_MicroPointerTy() {
Index: clang/lib/CodeGen/CGOpenMPRuntime.h
===================================================================
--- clang/lib/CodeGen/CGOpenMPRuntime.h
+++ clang/lib/CodeGen/CGOpenMPRuntime.h
@@ -378,7 +378,6 @@
Address getOrCreateDefaultLocation(unsigned Flags);
QualType IdentQTy;
- llvm::StructType *IdentTy = nullptr;
/// Map for SourceLocation and OpenMP runtime library debug locations.
typedef llvm::DenseMap<unsigned, llvm::Value *> OpenMPDebugLocMapTy;
OpenMPDebugLocMapTy OpenMPDebugLocMap;
Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===================================================================
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -1289,7 +1289,7 @@
addFieldToRecordDecl(C, RD, C.VoidPtrTy);
RD->completeDefinition();
IdentQTy = C.getRecordType(RD);
- IdentTy = CGM.getTypes().ConvertRecordDeclType(RD);
+ llvm::omp::types::initializeTypes(CGM.getModule());
KmpCriticalNameTy = llvm::ArrayType::get(CGM.Int32Ty, /*NumElements*/ 8);
loadOffloadInfoMetadata();
@@ -1799,7 +1799,7 @@
}
llvm::Type *CGOpenMPRuntime::getIdentTyPointerTy() {
- return IdentTy->getPointerTo();
+ return llvm::omp::types::IdentPtr;
}
llvm::Type *CGOpenMPRuntime::getKmpc_MicroPointerTy() {
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits