Remove static global GCNames from Function.cpp and move it to the Context
[oota-llvm.git] / lib / IR / Core.cpp
index 7f39c8085a69007d4263f0cd1c575a09f1f0550d..591dafa22a4b05933e2fa7176b0187540a9f518a 100644 (file)
@@ -1722,7 +1722,7 @@ void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC) {
 
 const char *LLVMGetGC(LLVMValueRef Fn) {
   Function *F = unwrap<Function>(Fn);
-  return F->hasGC()? F->getGC() : nullptr;
+  return F->hasGC()? F->getGC().c_str() : nullptr;
 }
 
 void LLVMSetGC(LLVMValueRef Fn, const char *GC) {