From fde961dbf36216d457739079adbc0a44712b57ac 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. llvm-svn: 141933 --- clang/lib/CodeGen/CodeGenModule.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.h') diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 48237b9b27d..8e38a899901 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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