diff options
-rw-r--r-- | lib/Frontend/RewriteObjC.cpp | 2 | ||||
-rw-r--r-- | test/Rewriter/rewrite-super-message.mm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp index cba92987a3..83d392aab3 100644 --- a/lib/Frontend/RewriteObjC.cpp +++ b/lib/Frontend/RewriteObjC.cpp @@ -640,7 +640,9 @@ void RewriteObjC::Initialize(ASTContext &context) { if (LangOpts.Microsoft) { Preamble += "#undef __OBJC_RW_DLLIMPORT\n"; Preamble += "#undef __OBJC_RW_STATICIMPORT\n"; + Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests. Preamble += "#define __attribute__(X)\n"; + Preamble += "#endif\n"; Preamble += "#define __weak\n"; } else { diff --git a/test/Rewriter/rewrite-super-message.mm b/test/Rewriter/rewrite-super-message.mm index 036aa1bb31..be0a963c55 100644 --- a/test/Rewriter/rewrite-super-message.mm +++ b/test/Rewriter/rewrite-super-message.mm @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=struct objc_object *" -D"Class=struct objc_class *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o - %t-rw.cpp | FileCheck %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -DKEEP_ATTRIBUTES -D"id=struct objc_object *" -D"Class=struct objc_class *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o - %t-rw.cpp | FileCheck %t-rw.cpp // radar 7738453 void *sel_registerName(const char *); |