This is an archive of the discontinued LLVM Phabricator instance.

[clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC)
ClosedPublic

Authored by barannikov88 on Jun 24 2023, 3:36 AM.

Diff Detail

Event Timeline

barannikov88 created this revision.Jun 24 2023, 3:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2023, 3:36 AM
barannikov88 published this revision for review.Jun 24 2023, 3:57 AM
barannikov88 added reviewers: nikic, JOE1994.
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2023, 3:57 AM
barannikov88 retitled this revision from [clang][CodeGen] Remove no-op EmitCastToVoidPtr to [clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC).Jun 24 2023, 3:58 AM
barannikov88 added inline comments.Jun 24 2023, 4:11 AM
clang/lib/CodeGen/CGAtomic.cpp
90

I suppose address space shouldn't be dropped here, but this is what the original code does.

clang/lib/CodeGen/ItaniumCXXABI.cpp
1470–1471

DestTy has become unused in both implementations. I'm not sure if I should remove it. It is always a [cv-qualified] void *.

nikic added inline comments.Jun 24 2023, 6:29 AM
clang/lib/CodeGen/ItaniumCXXABI.cpp
1470–1471

Removing it sounds reasonable.

  • Remove unused argument of EmitDynamicCastToVoid
  • While here, adjust the name to start with lowercase letter
barannikov88 marked an inline comment as done.Jun 24 2023, 7:08 AM
JOE1994 accepted this revision.Jun 24 2023, 8:09 AM
This revision is now accepted and ready to land.Jun 24 2023, 8:09 AM
JOE1994 added inline comments.Jun 24 2023, 8:11 AM
clang/lib/CodeGen/CGAtomic.cpp
90

I agree. I think this can be addressed in a separate revision.

This revision was landed with ongoing or failed builds.Jun 29 2023, 10:29 AM
This revision was automatically updated to reflect the committed changes.