[cfe-commits] r158353 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Bill Wendling isanbard at gmail.com
Tue Jun 12 08:55:03 PDT 2012


It calls the DIFile ctor, but that doesn't have side effects other than creating the class. :-) Thr same object is created a few lines below anyway. 

-bw

On Jun 12, 2012, at 1:21 AM, Chandler Carruth <chandlerc at google.com> wrote:

> On Mon, Jun 11, 2012 at 11:53 PM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Tue Jun 12 01:53:25 2012
> New Revision: 158353
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=158353&view=rev
> Log:
> Remove unused variable.
> 
> Is this really without a side-effect? Routines called "getOrCreateFoo" tend to leave me with the expectation that calling them did something somewhere else, so I'm a bit surprised this was just dropped on the floor... 
> 
> Modified:
>    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> 
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=158353&r1=158352&r2=158353&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Jun 12 01:53:25 2012
> @@ -1565,7 +1565,6 @@
> 
>  /// CreateEnumType - get enumeration type.
>  llvm::DIType CGDebugInfo::CreateEnumType(const EnumDecl *ED) {
> -  llvm::DIFile Unit = getOrCreateFile(ED->getLocation());
>   SmallVector<llvm::Value *, 16> Enumerators;
> 
>   // Create DIEnumerator elements for each enumerator.
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120612/4b4585b6/attachment.html>


More information about the cfe-commits mailing list