/*******************************************************************************
* Copyright (c) 2005, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
* Markus Schorn (Wind River Systems)
* Anton Leherbauer (Wind River Systems)
* Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IBasicType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IParameter;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
import org.eclipse.cdt.core.dom.parser.IBuiltinBindingsProvider;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.core.parser.util.ArrayUtil;
import org.eclipse.cdt.internal.core.dom.parser.c.CBasicType;
import org.eclipse.cdt.internal.core.dom.parser.c.CBuiltinParameter;
import org.eclipse.cdt.internal.core.dom.parser.c.CBuiltinVariable;
import org.eclipse.cdt.internal.core.dom.parser.c.CFunctionType;
import org.eclipse.cdt.internal.core.dom.parser.c.CImplicitFunction;
import org.eclipse.cdt.internal.core.dom.parser.c.CImplicitTypedef;
import org.eclipse.cdt.internal.core.dom.parser.c.CPointerType;
import org.eclipse.cdt.internal.core.dom.parser.c.CQualifierType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBuiltinParameter;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBuiltinVariable;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunctionType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPImplicitFunction;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPImplicitTypedef;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPQualifierType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.GPPPointerType;
/**
* This is the IBuiltinBindingsProvider used to implement the "Other" built-in GCC symbols defined:
* http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins
*/
public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
/**
* <code>BUILTIN_GCC_SYMBOL</code> is a built-in GCC symbol.
*/
public static final ASTNodeProperty BUILTIN_GCC_SYMBOL = new ASTNodeProperty(
"GCCBuiltinSymbolProvider.BUILTIN_GCC_SYMBOL - built-in GCC symbol"); //$NON-NLS-1$
private static final char[] __BUILTIN_ABORT = "__builtin_abort".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ABS = "__builtin_abs".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ACOS = "__builtin_acos".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ACOSF = "__builtin_acosf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ACOSL = "__builtin_acosl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ALLOCA = "__builtin_alloca".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ASIN = "__builtin_asin".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ASINF = "__builtin_asinf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ASINL = "__builtin_asinl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ATAN = "__builtin_atan".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ATANF = "__builtin_atanf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ATANL = "__builtin_atanl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ATAN2 = "__builtin_atan2".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ATAN2F = "__builtin_atan2f".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_ATAN2L = "__builtin_atan2l".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CEIL = "__builtin_ceil".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CEILF = "__builtin_ceilf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CEILL = "__builtin_caill".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CONJ = "__builtin_conj".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CONJF = "__builtin_conjf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CONJL = "__builtin_conjl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_COS = "__builtin_cos".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_COSF = "__builtin_cosf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_COSL = "__builtin_cosl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_COSH = "__builtin_cosh".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_COSHF = "__builtin_coshf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_COSHL = "__builtin_coshl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CREAL = "__builtin_creal".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CREALF = "__builtin_crealf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CREALL = "__builtin_creall".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CIMAG = "__builtin_cimag".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CIMAGF = "__builtin_cimagf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CIMAGL = "__builtin_cimagl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CHOOSE_EXPR = "__builtin_choose_expr".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CLZ = "__builtin_clz".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CLZL = "__builtin_clzl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CLZLL = "__builtin_clzll".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CTZ = "__builtin_ctz".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CTZL = "__builtin_ctzl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_CTZLL = "__builtin_ctzll".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXIT1 = "__builtin_exit".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXIT2 = "__builtin__Exit".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXIT3 = "__builtin__exit".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXP = "__builtin_exp".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXPECT = "__builtin_expect".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXPF = "__builtin_expf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_EXPL = "__builtin_expl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_FABS = "__builtin_fabs".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_FABSF = "__builtin_fabsf".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_FABSL = "__builtin_fabsl".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_FFS = "__builtin_ffs".toCharArray(); //$NON-NLS-1$
private static final char[] __BUILTIN_FFSL = "__builtin_ffsl".toCharArray(); //$NON-NLS-1$
private static final char[] __
- 1
- 2
前往页