r206982 - Updated to be a bit more const friendly. Also switched the linkage to be static since this function is file-local. No functional changes intended.

Aaron Ballman aaron at aaronballman.com
Wed Apr 23 06:58:22 PDT 2014


Author: aaronballman
Date: Wed Apr 23 08:58:21 2014
New Revision: 206982

URL: http://llvm.org/viewvc/llvm-project?rev=206982&view=rev
Log:
Updated to be a bit more const friendly. Also switched the linkage to be static since this function is file-local. No functional changes intended.

Modified:
    cfe/trunk/lib/Analysis/ThreadSafetyCommon.cpp

Modified: cfe/trunk/lib/Analysis/ThreadSafetyCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ThreadSafetyCommon.cpp?rev=206982&r1=206981&r2=206982&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/ThreadSafetyCommon.cpp (original)
+++ cfe/trunk/lib/Analysis/ThreadSafetyCommon.cpp Wed Apr 23 08:58:21 2014
@@ -97,9 +97,9 @@ void simplifyIncompleteArg(Variable *V,
 
 
 // Return true if E is a variable that points to an incomplete Phi node.
-inline bool isIncompleteVar(SExpr *E) {
-  if (Variable *V = dyn_cast<Variable>(E)) {
-    if (Phi *Ph = dyn_cast<Phi>(V->definition()))
+static bool isIncompleteVar(const SExpr *E) {
+  if (const auto *V = dyn_cast<Variable>(E)) {
+    if (const auto *Ph = dyn_cast<Phi>(V->definition()))
       return Ph->status() == Phi::PH_Incomplete;
   }
   return false;





More information about the cfe-commits mailing list