summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ConstantEmitter.h
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2019-11-15 02:12:58 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2019-11-28 00:59:25 +0100
commit1ac700cdef787383ad49a0e37d9894491ef19480 (patch)
tree859c5a902238bdce94b59f87a9e3bfafdd8957dc /clang/lib/CodeGen/ConstantEmitter.h
parent5272d2a3a43b21dadb61a8320c14df94db89acc1 (diff)
downloadbcm5719-llvm-1ac700cdef787383ad49a0e37d9894491ef19480.tar.gz
bcm5719-llvm-1ac700cdef787383ad49a0e37d9894491ef19480.zip
[CodeGen] Fix clang crash on aggregate initialization of array of labels
Summary: Fix PR43700 The ConstantEmitter in AggExprEmitter::EmitArrayInit was initialized with the CodeGenFunction set to null, which caused the crash. Also simplify another call, and make the CGF member a const pointer since it is public but only assigned in the constructor. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70302
Diffstat (limited to 'clang/lib/CodeGen/ConstantEmitter.h')
-rw-r--r--clang/lib/CodeGen/ConstantEmitter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/ConstantEmitter.h b/clang/lib/CodeGen/ConstantEmitter.h
index 59a19730f4e..121acbac4fa 100644
--- a/clang/lib/CodeGen/ConstantEmitter.h
+++ b/clang/lib/CodeGen/ConstantEmitter.h
@@ -23,7 +23,7 @@ namespace CodeGen {
class ConstantEmitter {
public:
CodeGenModule &CGM;
- CodeGenFunction *CGF;
+ CodeGenFunction *const CGF;
private:
bool Abstract = false;
OpenPOWER on IntegriCloud