Movatterモバイル変換


[0]ホーム

URL:


Google Git
Sign in
chromium /chromium /src /main /. /tools /clang /blink_gc_plugin /Config.cpp
blob: 359206b044ee33f48b3e33396c2157cab8b12c0a [file] [log] [blame]
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include"Config.h"
#include<cassert>
#include"clang/AST/AST.h"
usingnamespace clang;
constchar kNewOperatorName[]="operator new";
constchar kCreateName[]="Create";
constchar kTraceName[]="Trace";
constchar kTraceMultipleName[]="TraceMultiple";
constchar kTraceEphemeronName[]="TraceEphemeron";
constchar kFinalizeName[]="FinalizeGarbageCollectedObject";
constchar kTraceAfterDispatchName[]="TraceAfterDispatch";
constchar kRegisterWeakMembersName[]="RegisterWeakMembers";
constchar kHeapAllocatorName[]="HeapAllocator";
constchar kTraceIfNeededName[]="TraceIfNeeded";
constchar kVisitorDispatcherName[]="VisitorDispatcher";
constchar kVisitorVarName[]="visitor";
constchar kConstIteratorName[]="const_iterator";
constchar kIteratorName[]="iterator";
constchar kConstReverseIteratorName[]="const_reverse_iterator";
constchar kReverseIteratorName[]="reverse_iterator";
boolConfig::IsTemplateInstantiation(CXXRecordDecl* record){
ClassTemplateSpecializationDecl* spec=
dyn_cast<clang::ClassTemplateSpecializationDecl>(record);
if(!spec)
returnfalse;
switch(spec->getTemplateSpecializationKind()){
case TSK_ImplicitInstantiation:
case TSK_ExplicitInstantiationDefinition:
returntrue;
case TSK_Undeclared:
case TSK_ExplicitSpecialization:
returnfalse;
// TODO: unsupported cases.
case TSK_ExplicitInstantiationDeclaration:
returnfalse;
}
assert(false&&"Unknown template specialization kind");
returnfalse;
}

[8]ページ先頭

©2009-2025 Movatter.jp