[cfe-commits] r43505 - /cfe/trunk/Lex/Preprocessor.cpp

Chris Lattner sabre at nondot.org
Tue Oct 30 10:45:44 PDT 2007


Author: lattner
Date: Tue Oct 30 12:45:43 2007
New Revision: 43505

URL: http://llvm.org/viewvc/llvm-project?rev=43505&view=rev
Log:
Avoid using macro expansions, which causes these to come out in -E mode.

Modified:
    cfe/trunk/Lex/Preprocessor.cpp

Modified: cfe/trunk/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/Preprocessor.cpp?rev=43505&r1=43504&r2=43505&view=diff

==============================================================================
--- cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/Lex/Preprocessor.cpp Tue Oct 30 12:45:43 2007
@@ -392,22 +392,22 @@
     DefineBuiltinMacro(Buf, "NO=(BOOL)0");
     DefineBuiltinMacro(Buf, "Nil=0");
     DefineBuiltinMacro(Buf, "nil=0");
-    ObjcType = "OBJC_EXPORT const char *sel_getName(SEL sel);\n";
+    ObjcType = "extern const char *sel_getName(SEL sel);\n";
     Buf.insert(Buf.end(), ObjcType, ObjcType+strlen(ObjcType));
-    ObjcType = "OBJC_EXPORT SEL sel_getUid(const char *str);\n";
+    ObjcType = "extern SEL sel_getUid(const char *str);\n";
     Buf.insert(Buf.end(), ObjcType, ObjcType+strlen(ObjcType));
     
     // Predefine ObjC primitive functions, traditionally declared in
     // <objc/objc-runtime.h>. Unlike the declarations above, we don't protect
     // these with a header guard (since multiple identical function declarations
     // don't result in an error. FIXME: don't predefine these...
-    ObjcType = "OBJC_EXPORT id objc_getClass(const char *name);\n";
+    ObjcType = "extern id objc_getClass(const char *name);\n";
     Buf.insert(Buf.end(), ObjcType, ObjcType+strlen(ObjcType));
-    ObjcType = "OBJC_EXPORT id objc_getMetaClass(const char *name);\n";
+    ObjcType = "extern id objc_getMetaClass(const char *name);\n";
     Buf.insert(Buf.end(), ObjcType, ObjcType+strlen(ObjcType));
-    ObjcType = "OBJC_EXPORT id objc_msgSend(id self, SEL op, ...);\n";
+    ObjcType = "extern id objc_msgSend(id self, SEL op, ...);\n";
     Buf.insert(Buf.end(), ObjcType, ObjcType+strlen(ObjcType));
-    ObjcType = "OBJC_EXPORT id objc_msgSendSuper(struct objc_super *super, SEL op, ...);\n";
+    ObjcType = "extern id objc_msgSendSuper(struct objc_super *super, SEL op, ...);\n";
     Buf.insert(Buf.end(), ObjcType, ObjcType+strlen(ObjcType));
   }
 





More information about the cfe-commits mailing list