diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-13 23:20:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-13 23:20:05 +0000 |
commit | 6143293fa4366ee95d7e47e61bd030a34bf68b55 (patch) | |
tree | 9aa742ed437a22a37bd505e604a06d2b1768c667 /lib/CodeGen/CGObjC.cpp | |
parent | ae6814efb6c41bd0c0f6413d25097105284d5be7 (diff) |
Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.
Rename getStringForStringLiteral to GetStringForStringLiteral.
Add GetAddrOfConstantStringFromLiteral
- This combines GetAddrOfConstantString and
GetStringForStringLiteral. This method can be, but is not yet, more
efficient.
Change GetAddrOfConstantString to not add terminating '\0'
- <rdar://problem/6140956>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 7270884572..2e400f4d2a 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -52,7 +52,7 @@ llvm::Value *CodeGenFunction::EmitObjCMessageExpr(const ObjCMessageExpr *E) { if (!strcmp(classname, "super")) { classname = E->getMethodDecl()->getClassInterface()->getName(); } - llvm::Value *ClassName = CGM.GetAddrOfConstantString(classname); + llvm::Value *ClassName = CGM.GetAddrOfConstantCString(classname); ClassName = Builder.CreateStructGEP(ClassName, 0); Receiver = Runtime.LookupClass(Builder, ClassName); } else if (const PredefinedExpr *PDE = |