summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-06-09 00:40:30 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-06-09 00:40:30 +0000
commit54448909bf0c5856cd1683ac35039df967d4a128 (patch)
treedb036bb99f8be0887cbdb166e59ce2dbb8f7e187 /clang/tools/driver
parent1f62f57b37bdd40f877eff3a2b1e80f51c82249c (diff)
downloadbcm5719-llvm-54448909bf0c5856cd1683ac35039df967d4a128.tar.gz
bcm5719-llvm-54448909bf0c5856cd1683ac35039df967d4a128.zip
Represent debug information compression type fully
This is tied with the LLVM side of the change to expose the debug information compression types to clang. We now track the compression type as an enumeration rather than a boolean. We still use the same value (GNU) that we did previously. This is in preparation to support passing down the compression type and switch it based on the command line. llvm-svn: 305039
Diffstat (limited to 'clang/tools/driver')
-rw-r--r--clang/tools/driver/cc1as_main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp
index 33d957658cf..37c14f4a26e 100644
--- a/clang/tools/driver/cc1as_main.cpp
+++ b/clang/tools/driver/cc1as_main.cpp
@@ -88,12 +88,13 @@ struct AssemblerInvocation {
unsigned NoInitialTextSection : 1;
unsigned SaveTemporaryLabels : 1;
unsigned GenDwarfForAssembly : 1;
- unsigned CompressDebugSections : 1;
unsigned RelaxELFRelocations : 1;
unsigned DwarfVersion;
std::string DwarfDebugFlags;
std::string DwarfDebugProducer;
std::string DebugCompilationDir;
+ llvm::DebugCompressionType CompressDebugSections =
+ llvm::DebugCompressionType::None;
std::string MainFileName;
/// @}
@@ -201,7 +202,9 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
Opts.SaveTemporaryLabels = Args.hasArg(OPT_msave_temp_labels);
// Any DebugInfoKind implies GenDwarfForAssembly.
Opts.GenDwarfForAssembly = Args.hasArg(OPT_debug_info_kind_EQ);
- Opts.CompressDebugSections = Args.hasArg(OPT_compress_debug_sections);
+ // TODO: base this on -gz instead
+ if (Args.hasArg(OPT_compress_debug_sections))
+ Opts.CompressDebugSections = llvm::DebugCompressionType::GNU;
Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations);
Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 2, Diags);
Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
@@ -314,8 +317,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
// Ensure MCAsmInfo initialization occurs before any use, otherwise sections
// may be created with a combination of default and explicit settings.
- if (Opts.CompressDebugSections)
- MAI->setCompressDebugSections(DebugCompressionType::DCT_ZlibGnu);
+ MAI->setCompressDebugSections(Opts.CompressDebugSections);
MAI->setRelaxELFRelocations(Opts.RelaxELFRelocations);
OpenPOWER on IntegriCloud