diff options
| author | Youngsuk Kim <joseph942010@gmail.com> | 2023-09-30 06:17:46 -0400 |
|---|---|---|
| committer | JOE1994 <joseph942010@gmail.com> | 2023-09-30 06:55:41 -0400 |
| commit | 4346aaf05b66a204a7c21fad8e7673860e0270eb (patch) | |
| tree | ada59a8d210c258c87e75f797c44288c4e953720 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | f71ad19c04763b858e53e0e291698b769b7c2bfc (diff) | |
| download | llvm-4346aaf05b66a204a7c21fad8e7673860e0270eb.zip llvm-4346aaf05b66a204a7c21fad8e7673860e0270eb.tar.gz llvm-4346aaf05b66a204a7c21fad8e7673860e0270eb.tar.bz2 | |
[llvm] Remove uses of Type::getPointerTo() (NFC)
* Remove if its sole use is to support an unnecessary ptr-to-ptr bitcast
(remove the bitcast as well)
* Replace with use of other APIs.
NFC opaque pointer cleanup effort.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index f53fbd7..e991d05 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -5152,7 +5152,7 @@ void llvm::embedBitcodeInModule(llvm::Module &M, llvm::MemoryBufferRef Buf, // Save llvm.compiler.used and remove it. SmallVector<Constant *, 2> UsedArray; SmallVector<GlobalValue *, 4> UsedGlobals; - Type *UsedElementType = Type::getInt8Ty(M.getContext())->getPointerTo(0); + Type *UsedElementType = Type::getInt8PtrTy(M.getContext()); GlobalVariable *Used = collectUsedGlobalVariables(M, UsedGlobals, true); for (auto *GV : UsedGlobals) { if (GV->getName() != "llvm.embedded.module" && |
