summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-06-12 08:08:18 +0000
committerDaniel Jasper <djasper@google.com>2017-06-12 08:08:18 +0000
commit8a53b2010911e4a584812a62d1ee30554159d8e6 (patch)
tree30983157569c4ffbe150b66b33377ed5ec93d148 /tools
parent414d1fa14aa912f088a0ec6044e1f24bee1ba945 (diff)
Revert r305164/5/7.
cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added. Simple reproducer: clang -Wa,--compress-debug-sections /tmp/test.cc Result: error: unknown argument: '--compress-debug-sections' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/driver/cc1as_main.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp
index 2fc2b508ef..37c14f4a26 100644
--- a/tools/driver/cc1as_main.cpp
+++ b/tools/driver/cc1as_main.cpp
@@ -202,22 +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);
-
- if (const Arg *A = Args.getLastArg(OPT_compress_debug_sections,
- OPT_compress_debug_sections_EQ)) {
- if (A->getOption().getID() == OPT_compress_debug_sections) {
- // TODO: be more clever about the compression type auto-detection
- Opts.CompressDebugSections = llvm::DebugCompressionType::GNU;
- } else {
- Opts.CompressDebugSections =
- llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue())
- .Case("none", llvm::DebugCompressionType::None)
- .Case("zlib", llvm::DebugCompressionType::Z)
- .Case("zlib-gnu", llvm::DebugCompressionType::GNU)
- .Default(llvm::DebugCompressionType::None);
- }
- }
-
+ // 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);