diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 052a149ae26..e3859bcb673 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1911,8 +1911,11 @@ static bool insertParsePoints(Function &F, DominatorTree &DT, Pass *P,  /// point of this function is as an extension point for custom logic.  static bool shouldRewriteStatepointsIn(Function &F) {    // TODO: This should check the GCStrategy -  const std::string StatepointExampleName("statepoint-example"); -  return StatepointExampleName == F.getGC(); +  if (F.hasGC()) { +    const std::string StatepointExampleName("statepoint-example"); +    return StatepointExampleName == F.getGC(); +  } else +    return false;  }  bool RewriteStatepointsForGC::runOnFunction(Function &F) {  | 

