Move common code into the function it belongs to
llvm-svn: 138202
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 9c0e44c..91a8ea2 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -279,6 +279,7 @@
}
static void makeIslCompatible(std::string& str) {
+ str.erase(0, 1);
replace(str, ".", "_");
replace(str, "\"", "_");
}
@@ -288,8 +289,6 @@
WriteAsOperand(OS, getBaseAddr(), false);
BaseName = OS.str();
- // Remove the % in the name. This is not supported by isl.
- BaseName.erase(0,1);
makeIslCompatible(BaseName);
BaseName = "MemRef_" + BaseName;
}
@@ -689,8 +688,6 @@
WriteAsOperand(OS, &bb, false);
BaseName = OS.str();
- // Remove the % in the name. This is not supported by isl.
- BaseName.erase(0, 1);
makeIslCompatible(BaseName);
BaseName = "Stmt_" + BaseName;