diff options
author | JF Bastien <jfbastien@apple.com> | 2019-04-12 00:11:27 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2019-04-12 00:11:27 +0000 |
commit | ef202c308b5f0335104e0eab72f8ae6c3706874e (patch) | |
tree | e4534167ae006c80da748d8ded2c5db36516b4b6 /clang/lib/CodeGen/PatternInit.h | |
parent | ef035186dba65a6f51cb75c66bd0c525d47b3db7 (diff) | |
download | bcm5719-llvm-ef202c308b5f0335104e0eab72f8ae6c3706874e.tar.gz bcm5719-llvm-ef202c308b5f0335104e0eab72f8ae6c3706874e.zip |
Variable auto-init: also auto-init alloca
Summary:
alloca isn’t auto-init’d right now because it’s a different path in clang that
all the other stuff we support (it’s a builtin, not an expression).
Interestingly, alloca doesn’t have a type (as opposed to even VLA) so we can
really only initialize it with memset.
<rdar://problem/49794007>
Subscribers: jkorous, dexonsmith, cfe-commits, rjmccall, glider, kees, kcc, pcc
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60548
llvm-svn: 358243
Diffstat (limited to 'clang/lib/CodeGen/PatternInit.h')
-rw-r--r-- | clang/lib/CodeGen/PatternInit.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/PatternInit.h b/clang/lib/CodeGen/PatternInit.h new file mode 100644 index 00000000000..f117dde9ac6 --- /dev/null +++ b/clang/lib/CodeGen/PatternInit.h @@ -0,0 +1,27 @@ +//===- PatternInit - Pattern initialization ---------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_LIB_CODEGEN_PATTERNINIT_H +#define LLVM_CLANG_LIB_CODEGEN_PATTERNINIT_H + +namespace llvm { +class Constant; +class Type; +} // namespace llvm + +namespace clang { +namespace CodeGen { + +class CodeGenModule; + +llvm::Constant *initializationPatternFor(CodeGenModule &, llvm::Type *); + +} // end namespace CodeGen +} // end namespace clang + +#endif |