[llvm] b7767c7 - [OMPIRBuilder] Avoid use of getPointerElementType()
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 05:23:23 PST 2022
Author: Nikita Popov
Date: 2022-02-07T14:22:34+01:00
New Revision: b7767c71c9f9384d5ab055499d20b8afe5793c13
URL: https://github.com/llvm/llvm-project/commit/b7767c71c9f9384d5ab055499d20b8afe5793c13
DIFF: https://github.com/llvm/llvm-project/commit/b7767c71c9f9384d5ab055499d20b8afe5793c13.diff
LOG: [OMPIRBuilder] Avoid use of getPointerElementType()
Looks like I missed this call when removing others in this file.
Added:
Modified:
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 3a39e7ac9ff99..6d9511abbdfb3 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -3451,7 +3451,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createAtomicCapture(
Type *XTy = X.Var->getType();
assert(XTy->isPointerTy() &&
"OMP Atomic expects a pointer to target memory");
- Type *XElemTy = XTy->getPointerElementType();
+ Type *XElemTy = X.ElemTy;
assert((XElemTy->isFloatingPointTy() || XElemTy->isIntegerTy() ||
XElemTy->isPointerTy()) &&
"OMP atomic capture expected a scalar type");
More information about the llvm-commits
mailing list