jfb marked an inline comment as done. jfb added inline comments.
================ Comment at: lib/CodeGen/CGDecl.cpp:990-998 + std::string Name = ("__const." + FunctionName(D.getParentFunctionOrMethod()) + + "." + D.getName()) + .str(); + llvm::GlobalVariable *InsertBefore = nullptr; + unsigned AS = CGM.getContext().getTargetAddressSpace( + CGM.getStringLiteralAddressSpace()); + llvm::GlobalVariable *GV = new llvm::GlobalVariable( ---------------- dexonsmith wrote: > Can you just kill `Name` entirely, throwing this inline, to avoid the malloc? Sure. It seems less readable, but since the function is already factored out it's not that bad. Repository: rC Clang https://reviews.llvm.org/D54055 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits