Remove static global GCNames from Function.cpp and move it to the Context
[oota-llvm.git] / lib / Transforms / Scalar / PlaceSafepoints.cpp
index 28c610c2486a59fc516ac3877a9ecdf618482bbe..b56b3559912003aec099d391982b41e22b9a527b 100644 (file)
@@ -499,7 +499,7 @@ static bool isGCSafepointPoll(Function &F) {
 static bool shouldRewriteFunction(Function &F) {
   // TODO: This should check the GCStrategy
   if (F.hasGC()) {
-    const char *FunctionGCName = F.getGC();
+    const auto &FunctionGCName = F.getGC();
     const StringRef StatepointExampleName("statepoint-example");
     const StringRef CoreCLRName("coreclr");
     return (StatepointExampleName == FunctionGCName) ||