Commit 18d68780 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #183 from undingen/isAlloc

Fix isAllocCall check
parents 84bda3fd 1296ca93
......@@ -212,13 +212,6 @@ public:
if (isAllocCall(F->getName()))
return NoAlias;
// if (F->getName() == "malloc")
// return NoAlias;
//
// if (F->getName() == "_ZN6pyston2gc4Heap10allocSmallEmPPNS0_5BlockES4_") {
// return NoAlias;
//}
if (F->getName() == "_ZN6pyston2gc13runCollectionEv") {
assert(0);
return NoAlias;
......
......@@ -20,11 +20,11 @@
namespace pyston {
bool isAllocCall(const std::string& name) {
bool isAllocCall(const llvm::StringRef name) {
if (name == "malloc")
return true;
if (name == "_ZN6pyston2gc4Heap10allocSmallEmPPNS0_5BlockES4_")
if (name == "_ZN6pyston2gc4Heap10allocSmallEmi")
return true;
return false;
......
......@@ -19,11 +19,12 @@
namespace llvm {
class CallInst;
class StringRef;
}
namespace pyston {
bool isAllocCall(const std::string& name);
bool isAllocCall(const llvm::StringRef name);
bool isAllocCall(const llvm::CallInst* CI);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment