[llvm] 04d8e36 - [IRBuilder] Deprecate CreateGlobalStringPtr() (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 07:39:32 PDT 2024


Author: Nikita Popov
Date: 2024-09-23T16:39:22+02:00
New Revision: 04d8e364bbf758b2ecbc06b782f1b5dd91bd16e6

URL: https://github.com/llvm/llvm-project/commit/04d8e364bbf758b2ecbc06b782f1b5dd91bd16e6
DIFF: https://github.com/llvm/llvm-project/commit/04d8e364bbf758b2ecbc06b782f1b5dd91bd16e6.diff

LOG: [IRBuilder] Deprecate CreateGlobalStringPtr() (NFC)

In favor of CreateGlobalString(), which has the same behavior.
The distinction used to be meaningful prior to the introduction
of opaque pointers.

Added: 
    

Modified: 
    llvm/include/llvm/IR/IRBuilder.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 8f83dede4a0cbd..23fd8350a29b3d 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -2015,6 +2015,7 @@ class IRBuilderBase {
   ///
   /// If no module is given via \p M, it is take from the insertion point basic
   /// block.
+  LLVM_DEPRECATED("Use CreateGlobalString instead", "CreateGlobalString")
   Constant *CreateGlobalStringPtr(StringRef Str, const Twine &Name = "",
                                   unsigned AddressSpace = 0,
                                   Module *M = nullptr, bool AddNull = true) {


        


More information about the llvm-commits mailing list