[CodeGen] Avoid unnecessary ConstantExpr cast

With opaque pointers, this is not necessarily a ConstantExpr. And
we don't need one here either, just Constant is sufficient.
This commit is contained in:
Nikita Popov 2022-04-05 11:18:33 +02:00
parent 004d4f8980
commit ff18b158ed
1 changed files with 1 additions and 1 deletions

View File

@ -5407,7 +5407,7 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) {
auto Fields = Builder.beginStruct(STy);
// Class pointer.
Fields.add(cast<llvm::ConstantExpr>(CFConstantStringClassRef));
Fields.add(cast<llvm::Constant>(CFConstantStringClassRef));
// Flags.
if (IsSwiftABI) {