From 2ed7cb649aa709b875c519f4a980a1e2b5712370 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 14 Oct 2011 02:27:24 +0000 Subject: 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 --- lib/CodeGen/CodeGenModule.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/CodeGenModule.h') 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); -- cgit v1.2.3-70-g09d2