diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-10-14 02:27:24 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-10-14 02:27:24 +0000 |
commit | 2ed7cb649aa709b875c519f4a980a1e2b5712370 (patch) | |
tree | c53a1ccbed4103f4df940180053b9ca772db6730 /lib/CodeGen/CodeGenModule.h | |
parent | d1cb2dc9a318b1c432ec8cfe72cd7c7c0f251bef (diff) |
PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 48237b9b27..8e38a89990 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -670,6 +670,11 @@ public: /// but not always, an LLVM null constant. llvm::Constant *EmitNullConstant(QualType T); + /// EmitNullConstantForBase - Return a null constant appropriate for + /// zero-initializing a base class with the given type. This is usually, + /// but not always, an LLVM null constant. + llvm::Constant *EmitNullConstantForBase(const CXXRecordDecl *Record); + /// Error - Emit a general error that something can't be done. void Error(SourceLocation loc, StringRef error); |