aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-08-04 01:03:22 +0000
committerJohn McCall <rjmccall@apple.com>2011-08-04 01:03:22 +0000
commita5e19c6b2554f6d9c4b9850d4dbbbfa3643282e5 (patch)
tree6f39568d226e85d7a8001d6ac8b64acc466d4ad1 /lib/CodeGen/CodeGenModule.h
parent08551b575396ec89411a4e416d27fd7056ceaa9b (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.h8
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.