Mercurial > hg > CbC > CbC_gcc
view gcc/d/dmd/objc.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
/* Compiler implementation of the D programming language * Copyright (C) 2015-2019 by The D Language Foundation, All Rights Reserved * written by Michel Fortin * http://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. * http://www.boost.org/LICENSE_1_0.txt * https://github.com/D-Programming-Language/dmd/blob/master/src/objc_stubs.c */ #include "objc.h" #include "aggregate.h" #include "scope.h" class FuncDeclaration; // MARK: ObjcSelector ObjcSelector::ObjcSelector(const char *, size_t, size_t) { printf("Should never be called when D_OBJC is false\n"); assert(0); } ObjcSelector *ObjcSelector::lookup(const char *) { printf("Should never be called when D_OBJC is false\n"); assert(0); return NULL; } ObjcSelector *ObjcSelector::lookup(const char *, size_t, size_t) { printf("Should never be called when D_OBJC is false\n"); assert(0); return NULL; } ObjcSelector *ObjcSelector::create(FuncDeclaration *) { printf("Should never be called when D_OBJC is false\n"); assert(0); return NULL; } class UnsupportedObjc : public Objc { void setObjc(ClassDeclaration *cd) { cd->error("Objective-C classes not supported"); } void setObjc(InterfaceDeclaration *id) { id->error("Objective-C interfaces not supported"); } void setSelector(FuncDeclaration *, Scope *) { // noop } void validateSelector(FuncDeclaration *) { // noop } void checkLinkage(FuncDeclaration *) { // noop } }; static Objc *_objc; Objc *objc() { return _objc; } void Objc::_init() { _objc = new UnsupportedObjc(); }