diff options
author | John McCall <rjmccall@apple.com> | 2011-08-04 01:03:22 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-08-04 01:03:22 +0000 |
commit | a5e19c6b2554f6d9c4b9850d4dbbbfa3643282e5 (patch) | |
tree | 6f39568d226e85d7a8001d6ac8b64acc466d4ad1 /lib/CodeGen/CodeGenModule.h | |
parent | 08551b575396ec89411a4e416d27fd7056ceaa9b (diff) |
Emit wide string literals with the appropriate alignment.
Patch by Craig Topper and Sundeep!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 318c3ea263..ca72230559 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -263,7 +263,7 @@ class CodeGenModule : public CodeGenTypeCache { std::vector<llvm::Constant*> Annotations; llvm::StringMap<llvm::Constant*> CFConstantStringMap; - llvm::StringMap<llvm::Constant*> ConstantStringMap; + llvm::StringMap<llvm::GlobalVariable*> ConstantStringMap; llvm::DenseMap<const Decl*, llvm::Value*> StaticLocalDeclMap; /// CXXGlobalInits - Global variables with initializers that need to run @@ -545,7 +545,8 @@ public: /// \param GlobalName If provided, the name to use for the global /// (if one is created). llvm::Constant *GetAddrOfConstantString(StringRef Str, - const char *GlobalName=0); + const char *GlobalName=0, + unsigned Alignment=1); /// GetAddrOfConstantCString - Returns a pointer to a character array /// containing the literal and a terminating '\0' character. The result has @@ -554,7 +555,8 @@ public: /// \param GlobalName If provided, the name to use for the global (if one is /// created). llvm::Constant *GetAddrOfConstantCString(const std::string &str, - const char *GlobalName=0); + const char *GlobalName=0, + unsigned Alignment=1); /// GetAddrOfCXXConstructor - Return the address of the constructor of the /// given type. |