[llvm] 4d9f6ab - [IR] Handle opaque pointers in PtrToArgument mangling
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 03:38:06 PST 2022
Author: Nikita Popov
Date: 2022-01-27T12:36:25+01:00
New Revision: 4d9f6ab3054bdbe07982333b31974b357586acca
URL: https://github.com/llvm/llvm-project/commit/4d9f6ab3054bdbe07982333b31974b357586acca
DIFF: https://github.com/llvm/llvm-project/commit/4d9f6ab3054bdbe07982333b31974b357586acca.diff
LOG: [IR] Handle opaque pointers in PtrToArgument mangling
It appears that this mangling type is currently unused. Make it
compatible with opaque pointers in case it becomes used again...
Added:
Modified:
llvm/lib/IR/Function.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 72d8f9e1547f..1e874d7afa79 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -1575,7 +1575,7 @@ static bool matchIntrinsicType(
Type * ReferenceType = ArgTys[D.getArgumentNumber()];
PointerType *ThisArgType = dyn_cast<PointerType>(Ty);
return (!ThisArgType ||
- ThisArgType->getPointerElementType() != ReferenceType);
+ !ThisArgType->isOpaqueOrPointeeTypeMatches(ReferenceType));
}
case IITDescriptor::PtrToElt: {
if (D.getArgumentNumber() >= ArgTys.size())
More information about the llvm-commits
mailing list