From ff18b158edc4719c4b05cd04dceaedcf69a8d9c5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 5 Apr 2022 11:18:33 +0200 Subject: [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. --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d637ab6ec288..4d24c33f51d0 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -5407,7 +5407,7 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { auto Fields = Builder.beginStruct(STy); // Class pointer. - Fields.add(cast(CFConstantStringClassRef)); + Fields.add(cast(CFConstantStringClassRef)); // Flags. if (IsSwiftABI) { -- cgit v1.2.3