Add and use isDiscardableGVALinkage function.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25571

llvm-svn: 284159
diff --git a/clang/lib/Sema/SemaCUDA.cpp b/clang/lib/Sema/SemaCUDA.cpp
index 5333a44..18751d4 100644
--- a/clang/lib/Sema/SemaCUDA.cpp
+++ b/clang/lib/Sema/SemaCUDA.cpp
@@ -546,7 +546,7 @@
     return false;
 
   // Externally-visible and similar functions are always emitted.
-  if (S.getASTContext().GetGVALinkageForFunction(FD) > GVA_DiscardableODR)
+  if (!isDiscardableGVALinkage(S.getASTContext().GetGVALinkageForFunction(FD)))
     return true;
 
   // Otherwise, the function is known-emitted if it's in our set of