aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-11-16 22:31:39 +0000
committerChad Rosier <mcrosier@apple.com>2012-11-16 22:31:39 +0000
commitecf16265407c4d0edb860dc8259a6874d1a19f6e (patch)
tree297b27f2301d26ae6fad32661c42184fc3f9ca52
parent95f6190acb664b345b1395abaea84ee451740c5b (diff)
[driver] Add the missing TY_PP_ObjCXX_Alias case to the isCXX function.
This was causing different behavior when using -x objective-c++-cpp-output as compared to -x objc++-cpp-output. Specifically, the driver was not adding the -fcxx-exceptions flag in the latter case. rdar://12680312 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168212 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/Types.cpp2
-rw-r--r--test/Driver/objc++-cpp-output.mm6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/Driver/Types.cpp b/lib/Driver/Types.cpp
index 862025ed9a..7906ac3726 100644
--- a/lib/Driver/Types.cpp
+++ b/lib/Driver/Types.cpp
@@ -113,7 +113,7 @@ bool types::isCXX(ID Id) {
return false;
case TY_CXX: case TY_PP_CXX:
- case TY_ObjCXX: case TY_PP_ObjCXX:
+ case TY_ObjCXX: case TY_PP_ObjCXX: case TY_PP_ObjCXX_Alias:
case TY_CXXHeader: case TY_PP_CXXHeader:
case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader:
case TY_CUDA:
diff --git a/test/Driver/objc++-cpp-output.mm b/test/Driver/objc++-cpp-output.mm
index 9c4d55379a..63b15d8c18 100644
--- a/test/Driver/objc++-cpp-output.mm
+++ b/test/Driver/objc++-cpp-output.mm
@@ -1,4 +1,5 @@
// RUN: %clang -x objc++-cpp-output -c %s -o /dev/null
+// RUN: %clang -x objc++-cpp-output -c %s -o /dev/null -### 2>&1 | FileCheck %s
// PR13820
// REQUIRES: LP64
@@ -9,3 +10,8 @@
@end
void f() {}
class C {};
+
+// Make sure the driver is passing all the necessary exception flags.
+// CHECK: "-fobjc-exceptions"
+// CHECK: "-fcxx-exceptions"
+// CHECK: "-fexceptions"