diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDeclCXX.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index 95bd0001039..5b172a3480b 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -244,8 +244,6 @@ llvm::Function *CodeGenFunction::createAtExitStub(const VarDecl &VD, CGF.StartFunction(GlobalDecl(&VD, DynamicInitKind::AtExit), CGM.getContext().VoidTy, fn, FI, FunctionArgList()); - // Emit an artificial location for this function. - auto AL = ApplyDebugLocation::CreateArtificial(CGF); llvm::CallInst *call = CGF.Builder.CreateCall(dtor, addr); @@ -646,9 +644,8 @@ void CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn, StartFunction(GlobalDecl(D, DynamicInitKind::Initializer), getContext().VoidTy, Fn, getTypes().arrangeNullaryFunction(), - FunctionArgList()); - // Emit an artificial location for this function. - auto AL = ApplyDebugLocation::CreateArtificial(*this); + FunctionArgList(), D->getLocation(), + D->getInit()->getExprLoc()); // Use guarded initialization if the global variable is weak. This // occurs for, e.g., instantiated static data members and @@ -773,10 +770,7 @@ llvm::Function *CodeGenFunction::generateDestroyHelper( CurEHLocation = VD->getBeginLoc(); - StartFunction(GlobalDecl(VD, DynamicInitKind::GlobalArrayDestructor), - getContext().VoidTy, fn, FI, args); - // Emit an artificial location for this function. - auto AL = ApplyDebugLocation::CreateArtificial(*this); + StartFunction(VD, getContext().VoidTy, fn, FI, args); emitDestroy(addr, type, destroyer, useEHCleanupForArray); |