Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/amd-common' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
rocm-hcc committed Jun 14, 2019
2 parents 03c500f + e856e66 commit c8c6a61
Show file tree
Hide file tree
Showing 22 changed files with 5,959 additions and 24 deletions.
1 change: 0 additions & 1 deletion README.txt
Expand Up @@ -24,4 +24,3 @@ on the Clang development mailing list:

If you find a bug in Clang, please file it in the LLVM bug tracker:
http://llvm.org/bugs/

23 changes: 19 additions & 4 deletions lib/AST/ASTContext.cpp
Expand Up @@ -9805,10 +9805,25 @@ static GVALinkage basicGVALinkageForVariable(const ASTContext &Context,
return StrongLinkage;

case TSK_ExplicitSpecialization:
return Context.getTargetInfo().getCXXABI().isMicrosoft() &&
VD->isStaticDataMember()
? GVA_StrongODR
: StrongLinkage;
if (Context.getTargetInfo().getCXXABI().isMicrosoft()) {
// If this is a fully specialized constexpr variable template, pretend it
// was marked inline. MSVC 14.21.27702 headers define _Is_integral in a
// header this way, and we don't want to emit non-discardable definitions
// of these variables in every TU that includes <type_traits>. This
// behavior is non-conforming, since another TU could use an extern
// template declaration for this variable, but for constexpr variables,
// it's unlikely for a user to want to do that. This behavior can be
// removed if the headers change to explicitly mark such variable template
// specializations inline.
if (isa<VarTemplateSpecializationDecl>(VD) && VD->isConstexpr())
return GVA_DiscardableODR;

// Use ODR linkage for static data members of fully specialized templates
// to prevent duplicate definition errors with MSVC.
if (VD->isStaticDataMember())
return GVA_StrongODR;
}
return StrongLinkage;

case TSK_ExplicitInstantiationDefinition:
return GVA_StrongODR;
Expand Down
43 changes: 26 additions & 17 deletions lib/Analysis/ProgramPoint.cpp
Expand Up @@ -99,12 +99,6 @@ void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const {
case ProgramPoint::CallExitEndKind:
Out << "CallExitEnd\"";
break;
case ProgramPoint::PostStmtPurgeDeadSymbolsKind:
Out << "PostStmtPurgeDeadSymbols\"";
break;
case ProgramPoint::PreStmtPurgeDeadSymbolsKind:
Out << "PreStmtPurgeDeadSymbols\"";
break;
case ProgramPoint::EpsilonKind:
Out << "EpsilonPoint\"";
break;
Expand Down Expand Up @@ -210,20 +204,35 @@ void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const {
Out << ", ";
printLocJson(Out, S->getBeginLoc(), SM);

Out << ", \"stmt_point_kind\": ";
if (getAs<PreStmt>())
Out << "\"PreStmt\"";
Out << ", \"stmt_point_kind\": \"";
if (getAs<PreLoad>())
Out << "PreLoad";
else if (getAs<PreStore>())
Out << "PreStore";
else if (getAs<PostAllocatorCall>())
Out << "PostAllocatorCall";
else if (getAs<PostCondition>())
Out << "PostCondition";
else if (getAs<PostLoad>())
Out << "\"PostLoad\"";
else if (getAs<PostStore>())
Out << "\"PostStore\"";
Out << "PostLoad";
else if (getAs<PostLValue>())
Out << "\"PostLValue\"";
else if (getAs<PostAllocatorCall>())
Out << "\"PostAllocatorCall\"";
else
Out << "null";
Out << "PostLValue";
else if (getAs<PostStore>())
Out << "PostStore";
else if (getAs<PostStmt>())
Out << "PostStmt";
else if (getAs<PostStmtPurgeDeadSymbols>())
Out << "PostStmtPurgeDeadSymbols";
else if (getAs<PreStmtPurgeDeadSymbols>())
Out << "PreStmtPurgeDeadSymbols";
else if (getAs<PreStmt>())
Out << "PreStmt";
else {
Out << "\nKind: '" << getKind();
llvm_unreachable("' is unhandled StmtPoint kind!");
}

Out << '\"';
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/Headers/CMakeLists.txt
Expand Up @@ -131,6 +131,7 @@ set(ppc_wrapper_files
ppc_wrappers/mmintrin.h
ppc_wrappers/xmmintrin.h
ppc_wrappers/mm_malloc.h
ppc_wrappers/emmintrin.h
)

set(openmp_wrapper_files
Expand Down

0 comments on commit c8c6a61

Please sign in to comment.