[llvm] Add `AddNull` argument to `CreateGlobalString`. (PR #93036)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 07:32:38 PDT 2024


================
@@ -1992,8 +1992,9 @@ class IRBuilderBase {
   /// block.
   Constant *CreateGlobalStringPtr(StringRef Str, const Twine &Name = "",
                                   unsigned AddressSpace = 0,
-                                  Module *M = nullptr) {
-    GlobalVariable *GV = CreateGlobalString(Str, Name, AddressSpace, M);
+                                  Module *M = nullptr, bool AddNull = true) {
----------------
nikic wrote:

As a side note, CreateGlobalStringPtr should be removed in favor of CreateGlobalString, as they are identical since the opaque pointer migration.

https://github.com/llvm/llvm-project/pull/93036


More information about the llvm-commits mailing list