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 | fde961dbf36216d457739079adbc0a44712b57ac (patch) | |
tree | ec549031c40d5411dcb5696463b133eaaed2e884 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 4e2bfe0770fdd8154f057552df142126d1f559ae (diff) | |
download | llvm-fde961dbf36216d457739079adbc0a44712b57ac.zip llvm-fde961dbf36216d457739079adbc0a44712b57ac.tar.gz llvm-fde961dbf36216d457739079adbc0a44712b57ac.tar.bz2 |
PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.
llvm-svn: 141933
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 48237b9..8e38a89 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); |