summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2017-12-19 17:16:45 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2017-12-19 17:16:45 +0000
commitcf73eba142afd533205a94e3e472697cf908047b (patch)
tree723c1bf774fea5ae5634edbe99c1579c5548d0f3 /clang/test
parent51425fa5bae06690973c1fbb3453500113518055 (diff)
downloadbcm5719-llvm-cf73eba142afd533205a94e3e472697cf908047b.tar.gz
bcm5719-llvm-cf73eba142afd533205a94e3e472697cf908047b.zip
[clang] -foptimization-record-file= should imply -fsave-optimization-record
The Clang option -foptimization-record-file= controls which file an optimization record is output to. Optimization records are output if you use the Clang option -fsave-optimization-record. If you specify the first option without the second, you get a warning that the command line argument was unused. Passing -foptimization-record-file= should imply -fsave-optimization-record. This fixes PR33670 Patch by: Dmitry Venikov <venikov@phystech.edu> Differential revision: https://reviews.llvm.org/D39834 llvm-svn: 321090
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/opt-record.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Driver/opt-record.c b/clang/test/Driver/opt-record.c
index 5e8a28f5f8c..7b4ec48632e 100644
--- a/clang/test/Driver/opt-record.c
+++ b/clang/test/Driver/opt-record.c
@@ -9,6 +9,8 @@
// RUN: %clang -### -S -fsave-optimization-record -x cuda -nocudainc -nocudalib %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
// RUN: %clang -### -fsave-optimization-record -x cuda -nocudainc -nocudalib %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
// RUN: %clang -### -S -o FOO -fsave-optimization-record -foptimization-record-file=BAR.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ
+// RUN: %clang -### -S -o FOO -foptimization-record-file=BAR.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ
+// RUN: %clang -### -S -o FOO -foptimization-record-file=BAR.txt -fno-save-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-FOPT-DISABLE
// CHECK: "-cc1"
// CHECK: "-opt-record-file" "FOO.opt.yaml"
@@ -20,3 +22,4 @@
// CHECK-EQ: "-cc1"
// CHECK-EQ: "-opt-record-file" "BAR.txt"
+// CHECK-FOPT-DISABLE-NOT: "-fno-save-optimization-record"
OpenPOWER on IntegriCloud