forked from OSchip/llvm-project
[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:
parent
004d4f8980
commit
ff18b158ed
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue