]> granicus.if.org Git - clang/commitdiff
DebugInfo: Remove some now-unnecessary location handling around function arguments.
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 2 Jan 2015 19:49:10 +0000 (19:49 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 2 Jan 2015 19:49:10 +0000 (19:49 +0000)
r225000 generalized debug info line info handling for expressions such
that this code is no longer necessary.

This removes the last use of CGDebugInfo::getLocation, but not all the
uses of CGDebugInfo::CurLoc, which is still used internally in
CGDebugInfo. I'd like to do away with all of that & might succeed after
a few more patches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225085 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDebugInfo.h

index 6403fa99aa7bb7766d38bea76ff69c8629ee4936..f9b26b621036fe0135751bdafbd4958220ba4136 100644 (file)
@@ -2680,10 +2680,6 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args,
                                    const FunctionDecl *CalleeDecl,
                                    unsigned ParamsToSkip,
                                    bool ForceColumnInfo) {
-  CGDebugInfo *DI = getDebugInfo();
-  SourceLocation CallLoc;
-  if (DI) CallLoc = DI->getLocation();
-
   // We *have* to evaluate arguments from right to left in the MS C++ ABI,
   // because arguments are destroyed left to right in the callee.
   if (CGM.getTarget().getCXXABI().areArgsDestroyedLeftToRightInCallee()) {
@@ -2704,8 +2700,6 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args,
       EmitCallArg(Args, *Arg, ArgTypes[I]);
       emitNonNullArgCheck(*this, Args.back().RV, ArgTypes[I], Arg->getExprLoc(),
                           CalleeDecl, ParamsToSkip + I);
-      // Restore the debug location.
-      if (DI) DI->EmitLocation(Builder, CallLoc, ForceColumnInfo);
     }
 
     // Un-reverse the arguments we just evaluated so they match up with the LLVM
@@ -2720,8 +2714,6 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args,
     EmitCallArg(Args, *Arg, ArgTypes[I]);
     emitNonNullArgCheck(*this, Args.back().RV, ArgTypes[I], Arg->getExprLoc(),
                         CalleeDecl, ParamsToSkip + I);
-    // Restore the debug location.
-    if (DI) DI->EmitLocation(Builder, CallLoc, ForceColumnInfo);
   }
 }
 
index 92af27e4cc90cbb32a2365c810b3ce8ee90d66e4..4c73743b2c92bfcce7cb48da8caa706590cb3958 100644 (file)
@@ -222,9 +222,6 @@ public:
   /// invalid it is ignored.
   void setLocation(SourceLocation Loc);
 
-  /// getLocation - Return the current source location.
-  SourceLocation getLocation() const { return CurLoc; }
-
   /// EmitLocation - Emit metadata to indicate a change in line/column
   /// information in the source file.
   /// \param ForceColumnInfo  Assume DebugColumnInfo option is true.