[llvm] r204957 - DebugInfo: TargetOptions/MCAsmInfo support for compressed debug info sections

David Blaikie dblaikie at gmail.com
Thu Mar 27 13:45:42 PDT 2014


Author: dblaikie
Date: Thu Mar 27 15:45:41 2014
New Revision: 204957

URL: http://llvm.org/viewvc/llvm-project?rev=204957&view=rev
Log:
DebugInfo: TargetOptions/MCAsmInfo support for compressed debug info sections

Modified:
    llvm/trunk/include/llvm/MC/MCAsmInfo.h
    llvm/trunk/include/llvm/Target/TargetOptions.h
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=204957&r1=204956&r2=204957&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Thu Mar 27 15:45:41 2014
@@ -307,6 +307,9 @@ namespace llvm {
     /// construction (see LLVMTargetMachine::initAsmInfo()).
     bool UseIntegratedAssembler;
 
+    /// Compress DWARF debug sections. Defaults to false.
+    bool CompressDebugSections;
+
   public:
     explicit MCAsmInfo();
     virtual ~MCAsmInfo();
@@ -538,6 +541,12 @@ namespace llvm {
     virtual void setUseIntegratedAssembler(bool Value) {
       UseIntegratedAssembler = Value;
     }
+
+    bool compressDebugSections() const { return CompressDebugSections; }
+
+    void setCompressDebugSections(bool CompressDebugSections) {
+      this->CompressDebugSections = CompressDebugSections;
+    }
   };
 }
 

Modified: llvm/trunk/include/llvm/Target/TargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=204957&r1=204956&r2=204957&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetOptions.h (original)
+++ llvm/trunk/include/llvm/Target/TargetOptions.h Thu Mar 27 15:45:41 2014
@@ -50,8 +50,8 @@ namespace llvm {
           DisableTailCalls(false), StackAlignmentOverride(0),
           EnableFastISel(false), PositionIndependentExecutable(false),
           EnableSegmentedStacks(false), UseInitArray(false),
-          DisableIntegratedAS(false), TrapFuncName(""),
-          FloatABIType(FloatABI::Default),
+          DisableIntegratedAS(false), CompressDebugSections(false),
+          TrapFuncName(""), FloatABIType(FloatABI::Default),
           AllowFPOpFusion(FPOpFusion::Standard) {}
 
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
@@ -161,6 +161,9 @@ namespace llvm {
     /// Disable the integrated assembler.
     unsigned DisableIntegratedAS : 1;
 
+    /// Compress DWARF debug sections.
+    unsigned CompressDebugSections : 1;
+
     /// getTrapFunctionName - If this returns a non-empty string, this means
     /// isel should lower Intrinsic::trap to a call to the specified function
     /// name instead of an ISD::TRAP node.

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=204957&r1=204956&r2=204957&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Thu Mar 27 15:45:41 2014
@@ -75,6 +75,9 @@ void LLVMTargetMachine::initAsmInfo() {
   if (Options.DisableIntegratedAS)
     TmpAsmInfo->setUseIntegratedAssembler(false);
 
+  if (Options.CompressDebugSections)
+    TmpAsmInfo->setCompressDebugSections(true);
+
   AsmInfo = TmpAsmInfo;
 }
 





More information about the llvm-commits mailing list