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 <[email protected]> wrote:

> On Mon, Jun 11, 2012 at 11:53 PM, Bill Wendling <[email protected]> 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
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to