diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-12-14 18:48:18 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-12-14 18:48:18 +0000 |
commit | 09f12fa1ca2c5905dda696ea6007ae754b2e2c93 (patch) | |
tree | 0de7af0198c816a9b0585ea5e2d1a2c00cb480c2 /clang/lib | |
parent | 17e2633cd65d43ec0a14d247c7be83e2b793ef86 (diff) | |
download | bcm5719-llvm-09f12fa1ca2c5905dda696ea6007ae754b2e2c93.tar.gz bcm5719-llvm-09f12fa1ca2c5905dda696ea6007ae754b2e2c93.zip |
DebugInfo: More accurate line information for placement new.
This actually came up as a break in UBSan tests (look for a follow-up
commit to this one to see the UBSan test fallout) when I tried a broader
fix to location information.
I have some other ideas about how to do that broader change & will keep
looking into it.
llvm-svn: 224221
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 65e4b2df0db..31f9141eebb 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -1269,6 +1269,9 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { E->placement_arg_end(), /* CalleeDecl */ nullptr, /*ParamsToSkip*/ 1); + if (auto *DI = getDebugInfo()) + DI->EmitLocation(Builder, E->getLocStart()); + // Emit the allocation call. If the allocator is a global placement // operator, just "inline" it directly. RValue RV; |