[llvm] r204176 - Remove a bunch of unnecessary includes and forward declarations.

David Blaikie dblaikie at gmail.com
Tue Mar 18 14:03:34 PDT 2014


On Tue, Mar 18, 2014 at 1:37 PM, Eric Christopher <echristo at gmail.com> wrote:
> Author: echristo
> Date: Tue Mar 18 15:37:10 2014
> New Revision: 204176
>
> URL: http://llvm.org/viewvc/llvm-project?rev=204176&view=rev
> Log:
> Remove a bunch of unnecessary includes and forward declarations.
>
> Modified:
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=204176&r1=204175&r2=204176&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Tue Mar 18 15:37:10 2014
> @@ -18,13 +18,8 @@
>  #include "DIE.h"
>  #include "llvm/ADT/DenseMap.h"
>  #include "llvm/ADT/FoldingSet.h"
> -#include "llvm/ADT/MapVector.h"
> -#include "llvm/ADT/SetVector.h"
> -#include "llvm/ADT/SmallPtrSet.h"
> -#include "llvm/ADT/StringMap.h"
>  #include "llvm/CodeGen/LexicalScopes.h"
>  #include "llvm/IR/DebugInfo.h"
> -#include "llvm/IR/DebugLoc.h"

These header removals might be a bit aggressive/brittle - looks like
we need/use most of these in this header and should include them
explicitly here rather than getting them implicitly from other headers
we're including (modules will fix this kind of header leakage - yay!)

>  #include "llvm/MC/MachineLocation.h"
>  #include "llvm/MC/MCDwarf.h"
>  #include "llvm/Support/Allocator.h"
> @@ -33,21 +28,13 @@ namespace llvm {
>
>  class AsmPrinter;
>  class ByteStreamer;
> -class DwarfDebug;
> -class DwarfUnit;
> -class DwarfCompileUnit;
>  class ConstantInt;
>  class ConstantFP;
> -class DbgVariable;
> -class MachineFrameInfo;
> +class DwarfCompileUnit;
> +class DwarfDebug;
> +class DwarfTypeUnit;
> +class DwarfUnit;
>  class MachineModuleInfo;
> -class MachineOperand;
> -class MCAsmInfo;
> -class MCObjectFileInfo;

Great to see that we're using fewer of these machine things here.

> -class DIEAbbrev;
> -class DIE;
> -class DIELoc;
> -class DIEEntry;

Hmm - could we just use these forward decls instead of including
DIE.h? Wonder what we need from DIE.h

>
>  //===----------------------------------------------------------------------===//
>  /// \brief This class is used to record source line correspondence.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list