diff options
author | Daniel Jasper <djasper@google.com> | 2017-06-12 08:08:18 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2017-06-12 08:08:18 +0000 |
commit | cdc4408bbfca1628718ca3603bdd534f99c32595 (patch) | |
tree | 41d5ddd9ea5debf540179100aebe1b081ec8ffd0 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 2cd536c7055dab5aaaf2f96016705c11ae5e6eec (diff) | |
download | bcm5719-llvm-cdc4408bbfca1628718ca3603bdd534f99c32595.tar.gz bcm5719-llvm-cdc4408bbfca1628718ca3603bdd534f99c32595.zip |
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'
llvm-svn: 305182
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 4fd4872f385..bb635b7ad71 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -739,22 +739,9 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.InstrumentForProfiling = Args.hasArg(OPT_pg); Opts.CallFEntry = Args.hasArg(OPT_mfentry); Opts.EmitOpenCLArgMetadata = Args.hasArg(OPT_cl_kernel_arg_info); - - 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.setCompressDebugSections(llvm::DebugCompressionType::GNU); - } else { - auto DCT = 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); - Opts.setCompressDebugSections(DCT); - } - } - + // TODO: map this from -gz in the driver and give it a named value + if (Args.hasArg(OPT_compress_debug_sections)) + Opts.setCompressDebugSections(llvm::DebugCompressionType::GNU); Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations); Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir); for (auto A : Args.filtered(OPT_mlink_bitcode_file, OPT_mlink_cuda_bitcode)) { |