diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index 45044e62677008eb6f7bda0dd7a1f75deed5674f..e8bc3436d614abb6c00db5891b1006073f3d5395 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -980,6 +980,8 @@ def err_omp_expected_reduction_identifier : Error<
   "expected identifier or one of the following operators: '+', '-', '*', '&', '|', '^', '&&', or '||'">;
 def err_omp_decl_in_declare_simd : Error<
   "function declaration is expected after 'declare simd' directive">;
+def err_omp_unknown_affinity_kind : Error<
+  "incorrect affinity kind, expected one of 'data', 'node', or 'thread'">;
 def err_omp_unknown_map_type : Error<
   "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
 def err_omp_unknown_map_type_modifier : Error<
diff --git a/include/clang/Basic/OpenMPKinds.def b/include/clang/Basic/OpenMPKinds.def
index 91ffe16babe871f57ee1b3acf22140e294e83dd9..b93aee0e6d5cb3e82399b93d7b6f32e057164a96 100644
--- a/include/clang/Basic/OpenMPKinds.def
+++ b/include/clang/Basic/OpenMPKinds.def
@@ -339,9 +339,9 @@ OPENMP_DEFAULTMAP_KIND(scalar)
 OPENMP_DEFAULTMAP_MODIFIER(tofrom)
 
 // Static attributes for 'affinity' clause.
-OPENMP_AFFINITY_KIND(depend)
-OPENMP_AFFINITY_KIND(numa)
-OPENMP_AFFINITY_KIND(core)
+OPENMP_AFFINITY_KIND(data)
+OPENMP_AFFINITY_KIND(node)
+OPENMP_AFFINITY_KIND(thread)
 
 // Static attributes for 'depend' clause.
 OPENMP_DEPEND_KIND(in)
diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp
index 51dbd1c9fd690f2985cc17b5c884cb87b792b8ed..68b91c5be61e42cd293ce595c69186b3e2e03ab9 100644
--- a/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -2692,19 +2692,19 @@ void CGOpenMPRuntime::emitTaskAffinityClause(CodeGenFunction &CGF,
   // Constants for affinity kind accepted by the runtime.
   enum AffinityKindTy {
     AffinityNone = 0,
-    AffinityDepend,
-    AffinityNuma,
-    AffinityCore
+    AffinityData,
+    AffinityNode,
+    AffinityThread
   } RuntimeAffinity;
   switch (AffKind) {
-  case OMPC_AFFINITY_numa:
-    RuntimeAffinity = AffinityNuma;
+  case OMPC_AFFINITY_node:
+    RuntimeAffinity = AffinityNode;
     break;
-  case OMPC_AFFINITY_core:
-    RuntimeAffinity = AffinityCore;
+  case OMPC_AFFINITY_thread:
+    RuntimeAffinity = AffinityThread;
     break;
-  case OMPC_AFFINITY_depend:
-    RuntimeAffinity = AffinityDepend;
+  case OMPC_AFFINITY_data:
+    RuntimeAffinity = AffinityData;
     break;
   case OMPC_AFFINITY_unknown:
     llvm_unreachable("Unsupported affinity value.");
@@ -2712,7 +2712,7 @@ void CGOpenMPRuntime::emitTaskAffinityClause(CodeGenFunction &CGF,
 
   llvm::Value *Affinity = CGF.EmitScalarExpr(Aff, /*IgnoreResultAssign*/ true);
   const Type *ExprTy = Aff->getType().getTypePtr();
-  if (AffKind == OMPC_AFFINITY_depend && ExprTy->isPointerType()) {
+  if (AffKind == OMPC_AFFINITY_data && ExprTy->isPointerType()) {
     Affinity = CGF.Builder.CreatePtrToInt(Affinity, CGF.Int64Ty);
   }
 
diff --git a/lib/Parse/ParseOpenMP.cpp b/lib/Parse/ParseOpenMP.cpp
index 3577b6c70c45a1fde6ede47e6e1f28f2a5437d52..68cbc398e6d3863cc147dd47e6c14ca876cb57c0 100644
--- a/lib/Parse/ParseOpenMP.cpp
+++ b/lib/Parse/ParseOpenMP.cpp
@@ -1605,8 +1605,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
     Data.DepLinMapLoc = Tok.getLocation();
 
     if (Data.AffKind == OMPC_AFFINITY_unknown) {
-      //FIXME use correct error message
-      Diag(Tok, diag::err_omp_unknown_map_type);
+      Diag(Tok, diag::err_omp_unknown_affinity_kind);
     }
     ConsumeToken();
     if (Tok.is(tok::colon)) {