]> granicus.if.org Git - clang/commitdiff
Updated to be a bit more const friendly. Also switched the linkage to be static since...
authorAaron Ballman <aaron@aaronballman.com>
Wed, 23 Apr 2014 13:58:21 +0000 (13:58 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 23 Apr 2014 13:58:21 +0000 (13:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206982 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ThreadSafetyCommon.cpp

index 391680918e3e463754ead0f508d4186aa62eb821..252fd97496b11085f6795420687363c7aeeece2b 100644 (file)
@@ -97,9 +97,9 @@ void simplifyIncompleteArg(Variable *V, til::Phi *Ph) {
 
 
 // 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;