Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type::getInt32Ty(M.getContext()) have a bug !!! #7037

Open
xiaoxu1234 opened this issue Jun 28, 2023 · 1 comment
Open

Type::getInt32Ty(M.getContext()) have a bug !!! #7037

xiaoxu1234 opened this issue Jun 28, 2023 · 1 comment

Comments

@xiaoxu1234
Copy link

xiaoxu1234 commented Jun 28, 2023

Type *I32Ty = Type::getInt32Ty(M.getContext()); if (I32Ty->isIntegerTy()) { errs() << "xxx : I32Ty isIntegerTy\n"; } else if (I32Ty->isFunctionTy()) { errs() << "xxx : I32Ty isFunctionTy\n"; } else { errs() << "xxx : I32Ty isUnknown\n"; }

this code for I32Ty is FunctionTy, I32Ty should be isIntegerTy!!!

Reproduction steps as follows:
you can search llvm src LLVMPasses PassBuilderPipeLines.cpp, in this file has a lot of internel pass, you can find any one for module pass.

for example: Annotation2MetadataPass
PreservedAnalyses Annotation2MetadataPass::run(Module &M, ModuleAnalysisManager &AM) { Type *I32Ty = Type::getInt32Ty(M.getContext()); if (I32Ty->isIntegerTy()) { errs() << "xxx : I32Ty isIntegerTy\n"; } else if (I32Ty->isFunctionTy()) { errs() << "xxx : I32Ty isFunctionTy\n"; } else { errs() << "xxx : I32Ty isUnknown\n"; } convertAnnotation2Metadata(M); return PreservedAnalyses::all(); }

@xiaoxu1234
Copy link
Author

xiaoxu1234 commented Jul 3, 2023

The Issue only happend in xcode(15 beta) clang, clang dir is /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang. if I compile the open source code clang ..llvm to test Type::getInt32Ty method, it is IntegerTy. Maybe Xcode15-beta2'clang have some problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant