From 4ee7dc2369c1f0257a73b2e83a7d38fdebdd9176 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 2 Oct 2013 02:29:49 +0000 Subject: Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs when scalars are loaded / undergo lvalue-to-rvalue conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191808 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index b66a849284..4ae0bdd97c 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -238,7 +238,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { DI->EmitFunctionEnd(Builder); } - EmitFunctionEpilog(*CurFnInfo, EmitRetDbgLoc); + EmitFunctionEpilog(*CurFnInfo, EmitRetDbgLoc, EndLoc); EmitEndEHSpec(CurCodeDecl); assert(EHStack.empty() && @@ -591,7 +591,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, if (LambdaThisCaptureField) { // If this lambda captures this, load it. LValue ThisLValue = EmitLValueForLambdaField(LambdaThisCaptureField); - CXXThisValue = EmitLoadOfLValue(ThisLValue).getScalarVal(); + CXXThisValue = EmitLoadOfLValue(ThisLValue, + SourceLocation()).getScalarVal(); } } else { // Not in a lambda; just use 'this' from the method. -- cgit v1.2.3