[llvm-commits] [llvm] r127801 - /llvm/trunk/lib/Analysis/MemoryBuiltins.cpp

Nick Lewycky nicholas at mxc.ca
Wed Mar 16 22:20:12 PDT 2011


Author: nicholas
Date: Thu Mar 17 00:20:12 2011
New Revision: 127801

URL: http://llvm.org/viewvc/llvm-project?rev=127801&view=rev
Log:
Add comments for the demanglings. Correct mangled form of operator delete!

Modified:
    llvm/trunk/lib/Analysis/MemoryBuiltins.cpp

Modified: llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryBuiltins.cpp?rev=127801&r1=127800&r2=127801&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryBuiltins.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryBuiltins.cpp Thu Mar 17 00:20:12 2011
@@ -38,8 +38,10 @@
   if (Callee == 0 || !Callee->isDeclaration())
     return false;
   if (Callee->getName() != "malloc" &&
-      Callee->getName() != "_Znwj" && Callee->getName() != "_Znwm" &&
-      Callee->getName() != "_Znaj" && Callee->getName() != "_Znam")
+      Callee->getName() != "_Znwj" && // operator new(unsigned int)
+      Callee->getName() != "_Znwm" && // operator new(unsigned long)
+      Callee->getName() != "_Znaj" && // operator new[](unsigned int)
+      Callee->getName() != "_Znam")   // operator new[](unsigned long)
     return false;
 
   // Check malloc prototype.
@@ -197,8 +199,8 @@
     return 0;
 
   if (Callee->getName() != "free" &&
-      Callee->getName() != "_Zdlj" && Callee->getName() != "_Zdlm" &&
-      Callee->getName() != "_Zdaj" && Callee->getName() != "_Zdam")
+      Callee->getName() != "_ZdlPv" && // operator delete(void*)
+      Callee->getName() != "_ZdaPv")   // operator delete[](void*)
     return 0;
 
   // Check free prototype.





More information about the llvm-commits mailing list