LIBBUILTIN(siglongjmp, "vSJi", "fr", "setjmp.h", ALL_LANGUAGES)
// id objc_msgSend(id, SEL, ...)
LIBBUILTIN(objc_msgSend, "GGH.", "f", "objc/message.h", OBJC_LANG)
+// id objc_getClass(const char *name)
+LIBBUILTIN(objc_getClass, "GcC*", "f", "objc/runtime.h", OBJC_LANG)
BUILTIN(__builtin_objc_memmove_collectable, "v*v*vC*z", "nF")
// Builtin math library functions
class QualType;
class LangOptions;
- enum LANGUAGEID {
+ enum LanguageID {
C_LANG = 0x1, // builtin for c only.
CXX_LANG = 0x2, // builtin for cplusplus only.
OBJC_LANG = 0x4, // builtin for objective-c and objective-c++
struct Info {
const char *Name, *Type, *Attributes, *HeaderName;
- LANGUAGEID builtin_lang;
+ LanguageID builtin_lang;
bool Suppressed;
bool operator==(const Info &RHS) const {
--- /dev/null
+// RUN: %clang_cc1 %s -fsyntax-only -std=gnu99 -verify
+// rdar://8592641
+Class f0() { return objc_getClass("a"); } // expected-warning {{implicitly declaring C library function 'objc_getClass' with type 'id (const char *)'}} \
+ // expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getClass'}}