|
|
|
@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
|
|
|
|
|
#include "ELFDumper.h" |
|
|
|
|
#include "APValuePrinter.h" |
|
|
|
|
|
|
|
|
|
#include <llvm/Support/Host.h> |
|
|
|
|
#include <llvm/TargetParser/Host.h> |
|
|
|
|
#include <llvm/Support/Path.h> |
|
|
|
|
#include <llvm/Support/raw_ostream.h> |
|
|
|
|
#include <llvm/Support/TargetSelect.h> |
|
|
|
@ -880,11 +880,9 @@ static clang::CXXRecordDecl* GetCXXRecordDeclFromTemplateName(const clang::Templ
@@ -880,11 +880,9 @@ static clang::CXXRecordDecl* GetCXXRecordDeclFromTemplateName(const clang::Templ
|
|
|
|
|
|
|
|
|
|
switch (Name.getKind()) { |
|
|
|
|
case clang::TemplateName::Template: |
|
|
|
|
return dyn_cast<clang::CXXRecordDecl>( |
|
|
|
|
Name.getAsTemplateDecl()->getTemplatedDecl()); |
|
|
|
|
return dyn_cast<clang::CXXRecordDecl>(Name.getAsTemplateDecl()->getTemplatedDecl()); |
|
|
|
|
case clang::TemplateName::QualifiedTemplate: |
|
|
|
|
return dyn_cast<clang::CXXRecordDecl>( |
|
|
|
|
Name.getAsQualifiedTemplateName()->getTemplateDecl()->getTemplatedDecl()); |
|
|
|
|
return GetCXXRecordDeclFromTemplateName(Name.getAsQualifiedTemplateName()->getUnderlyingTemplate()); |
|
|
|
|
default: |
|
|
|
|
assert(0 && "Unknown template name kind"); |
|
|
|
|
return nullptr; |
|
|
|
@ -902,7 +900,7 @@ static clang::CXXRecordDecl* GetCXXRecordDeclFromBaseType(const clang::QualType&
@@ -902,7 +900,7 @@ static clang::CXXRecordDecl* GetCXXRecordDeclFromBaseType(const clang::QualType&
|
|
|
|
|
else if (auto Injected = Ty->getAs<clang::InjectedClassNameType>()) |
|
|
|
|
return Injected->getDecl(); |
|
|
|
|
|
|
|
|
|
assert("Could not get base CXX record from type"); |
|
|
|
|
assert(0 && "Could not get base CXX record from type"); |
|
|
|
|
return nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2604,7 +2602,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
@@ -2604,7 +2602,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
|
|
|
|
|
{ |
|
|
|
|
auto TO = Type->getAs<clang::TypeOfType>(); |
|
|
|
|
|
|
|
|
|
Ty = WalkType(TO->getUnderlyingType()); |
|
|
|
|
Ty = WalkType(TO->getUnmodifiedType()); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
case clang::Type::TypeOfExpr: |
|
|
|
@ -2666,8 +2664,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
@@ -2666,8 +2664,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
|
|
|
|
|
TSTL = &TSpecTL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ArrayRef<clang::TemplateArgument> TSArgs(TS->getArgs(), TS->getNumArgs()); |
|
|
|
|
TemplateArgumentList TArgs(TemplateArgumentList::OnStack, TSArgs); |
|
|
|
|
TemplateArgumentList TArgs(TemplateArgumentList::OnStack, TS->template_arguments()); |
|
|
|
|
TST->Arguments = WalkTemplateArgumentList(&TArgs, TSTL); |
|
|
|
|
|
|
|
|
|
Ty = TST; |
|
|
|
@ -2709,8 +2706,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
@@ -2709,8 +2706,7 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
|
|
|
|
|
TSTL = &TSpecTL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ArrayRef<clang::TemplateArgument> TSArgs(TS->getArgs(), TS->getNumArgs()); |
|
|
|
|
TemplateArgumentList TArgs(TemplateArgumentList::OnStack, TSArgs); |
|
|
|
|
TemplateArgumentList TArgs(TemplateArgumentList::OnStack, TS->template_arguments()); |
|
|
|
|
TST->Arguments = WalkTemplateArgumentList(&TArgs, TSTL); |
|
|
|
|
|
|
|
|
|
Ty = TST; |
|
|
|
@ -2773,9 +2769,9 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
@@ -2773,9 +2769,9 @@ Type* Parser::WalkType(clang::QualType QualType, const clang::TypeLoc* TL,
|
|
|
|
|
auto RepTy = TP->getReplacementType(); |
|
|
|
|
TPT->replacement = GetQualifiedType(RepTy, &Next); |
|
|
|
|
TPT->replacedParameter = (TemplateParameterType*) |
|
|
|
|
WalkType(clang::QualType(TP->getReplacedParameter(), 0), 0); |
|
|
|
|
WalkType(c->getASTContext().getTypeDeclType(TP->getReplacedParameter()), 0); |
|
|
|
|
TPT->replacedParameter->parameter = WalkTypeTemplateParameter( |
|
|
|
|
TP->getReplacedParameter()->getDecl()); |
|
|
|
|
TP->getReplacedParameter()); |
|
|
|
|
|
|
|
|
|
Ty = TPT; |
|
|
|
|
break; |
|
|
|
@ -4397,10 +4393,8 @@ bool Parser::SetupSourceFiles(const std::vector<std::string>& SourceFiles,
@@ -4397,10 +4393,8 @@ bool Parser::SetupSourceFiles(const std::vector<std::string>& SourceFiles,
|
|
|
|
|
std::vector<const clang::FileEntry*>& FileEntries) |
|
|
|
|
{ |
|
|
|
|
// Check that the file is reachable.
|
|
|
|
|
clang::ConstSearchDirIterator *Dir; |
|
|
|
|
llvm::SmallVector< |
|
|
|
|
std::pair<const clang::FileEntry *, const clang::DirectoryEntry *>, |
|
|
|
|
0> Includers; |
|
|
|
|
clang::ConstSearchDirIterator *Dir = 0; |
|
|
|
|
llvm::ArrayRef<std::pair<const clang::FileEntry*, clang::DirectoryEntryRef>> Includers; |
|
|
|
|
|
|
|
|
|
for (const auto& SourceFile : SourceFiles) |
|
|
|
|
{ |
|
|
|
@ -4914,8 +4908,8 @@ ParserTargetInfo* Parser::GetTargetInfo()
@@ -4914,8 +4908,8 @@ ParserTargetInfo* Parser::GetTargetInfo()
|
|
|
|
|
parserTargetInfo->longDoubleWidth = TI.getLongDoubleWidth(); |
|
|
|
|
parserTargetInfo->longLongAlign = TI.getLongLongAlign(); |
|
|
|
|
parserTargetInfo->longLongWidth = TI.getLongLongWidth(); |
|
|
|
|
parserTargetInfo->pointerAlign = TI.getPointerAlign(0); |
|
|
|
|
parserTargetInfo->pointerWidth = TI.getPointerWidth(0); |
|
|
|
|
parserTargetInfo->pointerAlign = TI.getPointerAlign(clang::LangAS::Default); |
|
|
|
|
parserTargetInfo->pointerWidth = TI.getPointerWidth(clang::LangAS::Default); |
|
|
|
|
parserTargetInfo->wCharAlign = TI.getWCharAlign(); |
|
|
|
|
parserTargetInfo->wCharWidth = TI.getWCharWidth(); |
|
|
|
|
parserTargetInfo->float128Align = TI.getFloat128Align(); |
|
|
|
|