Mercurial > hg > CbC > CbC_gcc
view gcc/d/dmd/objc.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
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(); }