Author: leonardchan Date: Thu Jun 13 10:40:03 2019 New Revision: 363281 URL: http://llvm.org/viewvc/llvm-project?rev=363281&view=rev Log: [clang][NewPM] Fix split debug test
This contains the part of D62225 which fixes CodeGen/split-debug-single-file.c by not placing .dwo sections when using -enable-split-dwarf=split. Differential Revision: https://reviews.llvm.org/D63168 Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp cfe/trunk/test/CodeGen/split-debug-single-file.c Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=363281&r1=363280&r2=363281&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original) +++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Jun 13 10:40:03 2019 @@ -1275,7 +1275,8 @@ void EmitAssemblyHelper::EmitAssemblyWit NeedCodeGen = true; CodeGenPasses.add( createTargetTransformInfoWrapperPass(getTargetIRAnalysis())); - if (!CodeGenOpts.SplitDwarfFile.empty()) { + if (!CodeGenOpts.SplitDwarfFile.empty() && + CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission) { DwoOS = openOutputFile(CodeGenOpts.SplitDwarfFile); if (!DwoOS) return; Modified: cfe/trunk/test/CodeGen/split-debug-single-file.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/split-debug-single-file.c?rev=363281&r1=363280&r2=363281&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/split-debug-single-file.c (original) +++ cfe/trunk/test/CodeGen/split-debug-single-file.c Thu Jun 13 10:40:03 2019 @@ -2,13 +2,19 @@ // Testing to ensure -enable-split-dwarf=single allows to place .dwo sections into regular output object. // RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \ -// RUN: -enable-split-dwarf=single -split-dwarf-file %t.o -emit-obj -o %t.o %s +// RUN: -enable-split-dwarf=single -split-dwarf-file %t.o -emit-obj -o %t.o %s -fno-experimental-new-pass-manager +// RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SINGLE %s +// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \ +// RUN: -enable-split-dwarf=single -split-dwarf-file %t.o -emit-obj -o %t.o %s -fexperimental-new-pass-manager // RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SINGLE %s // MODE-SINGLE: .dwo // Testing to ensure -enable-split-dwarf=split does not place .dwo sections into regular output object. // RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \ -// RUN: -enable-split-dwarf=split -split-dwarf-file %t.o -emit-obj -o %t.o %s +// RUN: -enable-split-dwarf=split -split-dwarf-file %t.o -emit-obj -o %t.o %s -fno-experimental-new-pass-manager +// RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SPLIT %s +// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \ +// RUN: -enable-split-dwarf=split -split-dwarf-file %t.o -emit-obj -o %t.o %s -fexperimental-new-pass-manager // RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SPLIT %s // MODE-SPLIT-NOT: .dwo _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits