aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2016-10-18 19:05:41 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2016-10-18 19:05:41 +0000
commit642f799b0dd907bf96ea20eb2a0ca94932605ca3 (patch)
tree17d3e1b4ff9d94e048693b8019c05e78a7d0503a /clang/lib/CodeGen/CodeGenFunction.h
parent1e425c9f24f6617b2bd3ab550d4df42dcff8d57d (diff)
downloadllvm-642f799b0dd907bf96ea20eb2a0ca94932605ca3.zip
llvm-642f799b0dd907bf96ea20eb2a0ca94932605ca3.tar.gz
llvm-642f799b0dd907bf96ea20eb2a0ca94932605ca3.tar.bz2
[CodeGen][ObjC] Do not call objc_storeStrong when initializing a
constexpr variable. When compiling a constexpr NSString initialized with an objective-c string literal, CodeGen emits objc_storeStrong on an uninitialized alloca, which causes a crash. This patch folds the code in EmitScalarInit into EmitStoreThroughLValue and fixes the crash by calling objc_retain on the string instead of using objc_storeStrong. rdar://problem/28562009 Differential Revision: https://reviews.llvm.org/D25547 llvm-svn: 284516
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 4de0987..8c4c1cd 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -2119,7 +2119,6 @@ public:
void EmitScalarInit(const Expr *init, const ValueDecl *D, LValue lvalue,
bool capturedByInit);
- void EmitScalarInit(llvm::Value *init, LValue lvalue);
typedef void SpecialInitFn(CodeGenFunction &Init, const VarDecl &D,
llvm::Value *Address);