diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-05 09:12:18 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-05 09:12:18 +0000 |
commit | b47c36f8e113f238124fa00ae7d444d02f5b470e (patch) | |
tree | 1403473a0d2940847dbc1f4693828ec093abc1b7 /clang/lib/CodeGen/CGExpr.cpp | |
parent | 2d1d3ca1cc0255faad99e2eb77cfe4b269410152 (diff) | |
download | bcm5719-llvm-b47c36f8e113f238124fa00ae7d444d02f5b470e.tar.gz bcm5719-llvm-b47c36f8e113f238124fa00ae7d444d02f5b470e.zip |
C++1y sized deallocation: if we have a use, but not a definition, of a sized
deallocation function (and the corresponding unsized deallocation function has
been declared), emit a weak discardable definition of the function that
forwards to the corresponding unsized deallocation.
This allows a C++ standard library implementation to provide both a sized and
an unsized deallocation function, where the unsized one does not just call the
sized one, for instance by putting both in the same object file within an
archive.
llvm-svn: 194055
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 221d132ee0b..4a427d540f6 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1824,8 +1824,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { return LV; } - if (const FunctionDecl *fn = dyn_cast<FunctionDecl>(ND)) - return EmitFunctionDeclLValue(*this, E, fn); + if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) + return EmitFunctionDeclLValue(*this, E, FD); llvm_unreachable("Unhandled DeclRefExpr"); } |