aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-11-22 22:48:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-11-22 22:48:32 +0000
commit2d988f0f05db22d0771d31e5839ed6df01e8ac19 (patch)
treef95ac3e798e7e8ba2529865cc8ba6ceb83b98fb7 /clang/lib/CodeGen/CodeGenModule.h
parent1959df2c9c2ee2a0b82d08fb6fe0bdfb32d70598 (diff)
downloadllvm-2d988f0f05db22d0771d31e5839ed6df01e8ac19.zip
llvm-2d988f0f05db22d0771d31e5839ed6df01e8ac19.tar.gz
llvm-2d988f0f05db22d0771d31e5839ed6df01e8ac19.tar.bz2
Use static storage duration for file-scope compound literals, even when they
appear in non-constant initializers in C++. llvm-svn: 145087
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 7b82819..4c31737 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -599,6 +599,10 @@ public:
llvm::Constant *GetAddrOfConstantCString(const std::string &str,
const char *GlobalName=0,
unsigned Alignment=1);
+
+ /// GetAddrOfConstantCompoundLiteral - Returns a pointer to a constant global
+ /// variable for the given file-scope compound literal expression.
+ llvm::Constant *GetAddrOfConstantCompoundLiteral(const CompoundLiteralExpr*E);
/// \brief Retrieve the record type that describes the state of an
/// Objective-C fast enumeration loop (for..in).