aboutsummaryrefslogtreecommitdiff
path: root/clang/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
commit9b24df470d7e395ee419e984c051322da64cf36f (patch)
tree0cccd491249191ac3d4e4e7fbeba213867fc69e9 /clang/lib/CodeGen/CodeGenModule.h
parente4df09f7ba660cf04d73a06aeb11abd8d0e26e6e (diff)
downloadllvm-9b24df470d7e395ee419e984c051322da64cf36f.zip
llvm-9b24df470d7e395ee419e984c051322da64cf36f.tar.gz
llvm-9b24df470d7e395ee419e984c051322da64cf36f.tar.bz2
Emit wide string literals with the appropriate alignment.
Patch by Craig Topper and Sundeep! llvm-svn: 136856
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 318c3ea..ca72230 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/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.