diff options
author | Youngsuk Kim <youngsuk.kim@hpe.com> | 2023-10-31 14:56:50 -0500 |
---|---|---|
committer | Youngsuk Kim <youngsuk.kim@hpe.com> | 2023-11-01 09:06:15 -0500 |
commit | bc44e6e7c64ae7abd885fc31a62e37f649e307be (patch) | |
tree | 5099203231e8265e292cd2a2fd3311d784713f3f /clang/lib/CodeGen/CGDecl.cpp | |
parent | 008af1c9f4cd0188a69bf42b821749154a8142c8 (diff) | |
download | llvm-bc44e6e7c64ae7abd885fc31a62e37f649e307be.zip llvm-bc44e6e7c64ae7abd885fc31a62e37f649e307be.tar.gz llvm-bc44e6e7c64ae7abd885fc31a62e37f649e307be.tar.bz2 |
[clang] Remove no-op ptr-to-ptr bitcasts (NFC)
Opaque pointer cleanup effort.
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 9e4319d..0420f43 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -386,9 +386,7 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl &D, GV->takeName(OldGV); // Replace all uses of the old global with the new global - llvm::Constant *NewPtrForOldDecl = - llvm::ConstantExpr::getBitCast(GV, OldGV->getType()); - OldGV->replaceAllUsesWith(NewPtrForOldDecl); + OldGV->replaceAllUsesWith(GV); // Erase the old global, since it is no longer used. OldGV->eraseFromParent(); |