[llvm-commits] [llvm] r51700 - in /llvm/branches/ggreif/use-diet: include/llvm/Instructions.h include/llvm/User.h lib/VMCore/Instructions.cpp

Gabor Greif ggreif at gmail.com
Thu May 29 13:05:50 PDT 2008


Author: ggreif
Date: Thu May 29 15:05:50 2008
New Revision: 51700

URL: http://llvm.org/viewvc/llvm-project?rev=51700&view=rev
Log:
remove ugly kludge

Modified:
    llvm/branches/ggreif/use-diet/include/llvm/Instructions.h
    llvm/branches/ggreif/use-diet/include/llvm/User.h
    llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp

Modified: llvm/branches/ggreif/use-diet/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/include/llvm/Instructions.h?rev=51700&r1=51699&r2=51700&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/include/llvm/Instructions.h (original)
+++ llvm/branches/ggreif/use-diet/include/llvm/Instructions.h Thu May 29 15:05:50 2008
@@ -1274,13 +1274,13 @@
 SelectInst *SelectInst::Create(Value *C, Value *S1, Value *S2,
                                const std::string &Name,
                                Instruction *InsertBefore) {
-  return new('A', OperandTraits<SelectInst>::alloc<SelectInst>())
+  return ::new(OperandTraits<SelectInst>::alloc<SelectInst>())
     SelectInst(C, S1, S2, Name, InsertBefore);
 }
 SelectInst *SelectInst::Create(Value *C, Value *S1, Value *S2,
                                const std::string &Name,
                                BasicBlock *InsertAtEnd) {
-  return new('A', OperandTraits<SelectInst>::alloc<SelectInst>())
+  return ::new(OperandTraits<SelectInst>::alloc<SelectInst>())
     SelectInst(C, S1, S2, Name, InsertAtEnd);
 }
 

Modified: llvm/branches/ggreif/use-diet/include/llvm/User.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/include/llvm/User.h?rev=51700&r1=51699&r2=51700&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/include/llvm/User.h (original)
+++ llvm/branches/ggreif/use-diet/include/llvm/User.h Thu May 29 15:05:50 2008
@@ -227,9 +227,6 @@
   ///
   unsigned NumOperands;
 
-  void* operator new(size_t, char dummy, void* __p) throw() {
-    return __p;
-  }
   void *operator new(size_t s, unsigned Us) {
     void *Storage = ::operator new(s + sizeof(Use) * Us);
     Use *Start = static_cast<Use*>(Storage);

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp?rev=51700&r1=51699&r2=51700&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp Thu May 29 15:05:50 2008
@@ -2813,7 +2813,7 @@
   return new(getNumOperands()) CallInst(*this);
 }
 SelectInst *SelectInst::clone()   const {
-  return new('A', OperandTraits<SelectInst>::alloc<SelectInst>())
+  return ::new(OperandTraits<SelectInst>::alloc<SelectInst>())
     SelectInst(*this);
 }
 VAArgInst  *VAArgInst::clone()    const { return new VAArgInst(*this); }





More information about the llvm-commits mailing list