Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: lib/AST/ASTContext.cpp

Issue 1022123003: clang: add support for asmjs arch and Emscripten OS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-clang.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===--- ASTContext.cpp - Context to hold long-lived AST nodes ------------===// 1 //===--- ASTContext.cpp - Context to hold long-lived AST nodes ------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the ASTContext interface. 10 // This file implements the ASTContext interface.
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 return CanonTTP; 674 return CanonTTP;
675 } 675 }
676 676
677 CXXABI *ASTContext::createCXXABI(const TargetInfo &T) { 677 CXXABI *ASTContext::createCXXABI(const TargetInfo &T) {
678 if (!LangOpts.CPlusPlus) return nullptr; 678 if (!LangOpts.CPlusPlus) return nullptr;
679 679
680 switch (T.getCXXABI().getKind()) { 680 switch (T.getCXXABI().getKind()) {
681 case TargetCXXABI::GenericARM: // Same as Itanium at this level 681 case TargetCXXABI::GenericARM: // Same as Itanium at this level
682 case TargetCXXABI::iOS: 682 case TargetCXXABI::iOS:
683 case TargetCXXABI::iOS64: 683 case TargetCXXABI::iOS64:
684 case TargetCXXABI::Emscripten: // @LOCALMOD Emscripten
684 case TargetCXXABI::GenericAArch64: 685 case TargetCXXABI::GenericAArch64:
685 case TargetCXXABI::GenericItanium: 686 case TargetCXXABI::GenericItanium:
686 return CreateItaniumCXXABI(*this); 687 return CreateItaniumCXXABI(*this);
687 case TargetCXXABI::Microsoft: 688 case TargetCXXABI::Microsoft:
688 return CreateMicrosoftCXXABI(*this); 689 return CreateMicrosoftCXXABI(*this);
689 } 690 }
690 llvm_unreachable("Invalid CXXABI type!"); 691 llvm_unreachable("Invalid CXXABI type!");
691 } 692 }
692 693
693 static const LangAS::Map *getAddressSpaceMap(const TargetInfo &T, 694 static const LangAS::Map *getAddressSpaceMap(const TargetInfo &T,
(...skipping 7363 matching lines...) Expand 10 before | Expand all | Expand 10 after
8057 VTContext.reset(new ItaniumVTableContext(*this)); 8058 VTContext.reset(new ItaniumVTableContext(*this));
8058 } 8059 }
8059 return VTContext.get(); 8060 return VTContext.get();
8060 } 8061 }
8061 8062
8062 MangleContext *ASTContext::createMangleContext() { 8063 MangleContext *ASTContext::createMangleContext() {
8063 switch (Target->getCXXABI().getKind()) { 8064 switch (Target->getCXXABI().getKind()) {
8064 case TargetCXXABI::GenericAArch64: 8065 case TargetCXXABI::GenericAArch64:
8065 case TargetCXXABI::GenericItanium: 8066 case TargetCXXABI::GenericItanium:
8066 case TargetCXXABI::GenericARM: 8067 case TargetCXXABI::GenericARM:
8068 case TargetCXXABI::Emscripten: // @LOCALMOD Emscripten
8067 case TargetCXXABI::iOS: 8069 case TargetCXXABI::iOS:
8068 case TargetCXXABI::iOS64: 8070 case TargetCXXABI::iOS64:
8069 return ItaniumMangleContext::create(*this, getDiagnostics()); 8071 return ItaniumMangleContext::create(*this, getDiagnostics());
8070 case TargetCXXABI::Microsoft: 8072 case TargetCXXABI::Microsoft:
8071 return MicrosoftMangleContext::create(*this, getDiagnostics()); 8073 return MicrosoftMangleContext::create(*this, getDiagnostics());
8072 } 8074 }
8073 llvm_unreachable("Unsupported ABI"); 8075 llvm_unreachable("Unsupported ABI");
8074 } 8076 }
8075 8077
8076 CXXABI::~CXXABI() {} 8078 CXXABI::~CXXABI() {}
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
8357 } 8359 }
8358 8360
8359 // Explicitly instantiate this in case a Redeclarable<T> is used from a TU that 8361 // Explicitly instantiate this in case a Redeclarable<T> is used from a TU that
8360 // doesn't include ASTContext.h 8362 // doesn't include ASTContext.h
8361 template 8363 template
8362 clang::LazyGenerationalUpdatePtr< 8364 clang::LazyGenerationalUpdatePtr<
8363 const Decl *, Decl *, &ExternalASTSource::CompleteRedeclChain>::ValueType 8365 const Decl *, Decl *, &ExternalASTSource::CompleteRedeclChain>::ValueType
8364 clang::LazyGenerationalUpdatePtr< 8366 clang::LazyGenerationalUpdatePtr<
8365 const Decl *, Decl *, &ExternalASTSource::CompleteRedeclChain>::makeValue( 8367 const Decl *, Decl *, &ExternalASTSource::CompleteRedeclChain>::makeValue(
8366 const clang::ASTContext &Ctx, Decl *Value); 8368 const clang::ASTContext &Ctx, Decl *Value);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698