r227567 - Remove unneeded code
Filipe Cabecinhas
me at filcab.net
Fri Jan 30 03:17:56 PST 2015
Author: filcab
Date: Fri Jan 30 05:17:56 2015
New Revision: 227567
URL: http://llvm.org/viewvc/llvm-project?rev=227567&view=rev
Log:
Remove unneeded code
We don't really care about enabling RTTI with -fexceptions, only with
-fcxx-exceptions.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/rtti-options.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=227567&r1=227566&r2=227567&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jan 30 05:17:56 2015
@@ -3968,8 +3968,7 @@ void Clang::ConstructJob(Compilation &C,
// explicitly passed, error out. Otherwise enable rtti and emit a
// warning.
if (Triple.isPS4CPU()) {
- if (Arg *A = Args.getLastArg(options::OPT_fcxx_exceptions,
- options::OPT_fexceptions)) {
+ if (Arg *A = Args.getLastArg(options::OPT_fcxx_exceptions)) {
if (NoRTTIArg)
D.Diag(diag::err_drv_argument_not_allowed_with)
<< NoRTTIArg->getAsString(Args) << A->getAsString(Args);
Modified: cfe/trunk/test/Driver/rtti-options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/rtti-options.cpp?rev=227567&r1=227566&r2=227567&view=diff
==============================================================================
--- cfe/trunk/test/Driver/rtti-options.cpp (original)
+++ cfe/trunk/test/Driver/rtti-options.cpp Fri Jan 30 05:17:56 2015
@@ -18,19 +18,13 @@
// RUN: %clang -### -c -target x86_64-unknown-unknown -fsanitize=undefined -fno-rtti %s 2>&1 | FileCheck -check-prefix=CHECK-SAN-ERROR %s
// Exceptions + no/default rtti
-// RUN: %clang -### -c -target x86_64-scei-ps4 -fexceptions -fno-rtti %s 2>&1 | FileCheck -check-prefix=CHECK-EXC-ERROR %s
// RUN: %clang -### -c -target x86_64-scei-ps4 -fcxx-exceptions -fno-rtti %s 2>&1 | FileCheck -check-prefix=CHECK-EXC-ERROR-CXX %s
-// RUN: %clang -### -c -target x86_64-scei-ps4 -fexceptions %s 2>&1 | FileCheck -check-prefix=CHECK-EXC-WARN %s
// RUN: %clang -### -c -target x86_64-scei-ps4 -fcxx-exceptions %s 2>&1 | FileCheck -check-prefix=CHECK-EXC-WARN %s
-// RUN: %clang -### -c -target x86_64-unknown-unknown -fexceptions -fno-rtti %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
// RUN: %clang -### -c -target x86_64-unknown-unknown -fcxx-exceptions -fno-rtti %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
-// RUN: %clang -### -c -target x86_64-unknown-unknown -fexceptions %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
// RUN: %clang -### -c -target x86_64-unknown-unknown -fcxx-exceptions %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
// -frtti + exceptions
-// RUN: %clang -### -c -target x86_64-scei-ps4 -fexceptions -frtti %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
// RUN: %clang -### -c -target x86_64-scei-ps4 -fcxx-exceptions -frtti %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
-// RUN: %clang -### -c -target x86_64-unknown-unknown -fexceptions -frtti %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
// RUN: %clang -### -c -target x86_64-unknown-unknown -fcxx-exceptions -frtti %s 2>&1 | FileCheck -check-prefix=CHECK-OK %s
// -f{no-,}rtti/default
@@ -44,7 +38,6 @@
// CHECK-SAN-WARN: implicitly disabling vptr sanitizer because rtti wasn't enabled
// CHECK-SAN-ERROR: invalid argument '-fsanitize=vptr' not allowed with '-fno-rtti'
// CHECK-EXC-WARN: implicitly enabling rtti for exception handling
-// CHECK-EXC-ERROR: invalid argument '-fno-rtti' not allowed with '-fexceptions'
// CHECK-EXC-ERROR-CXX: invalid argument '-fno-rtti' not allowed with '-fcxx-exceptions'
// CHECK-RTTI-NOT: "-fno-rtti"
// CHECK-NO-RTTI-NOT: "-frtti"
More information about the cfe-commits
mailing list