[PATCH] D34120: [IR] Stop trying to delete other signatures of User::operator new when we override one signature in a class derived from User

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 15:51:55 PDT 2017


craig.topper added a comment.

Trying to allocate a ShuffleVector with the explicit use count form before the patch

  lib/AsmParser/LLParser.cpp:5822:10: error: call to deleted function 'operator new'
    Inst = new (3) ShuffleVectorInst(Op0, Op1, Op2);
           ^   ~~~
  include/llvm/IR/Instructions.h:2237:9: note: candidate function has been explicitly deleted
    void *operator new(size_t, unsigned) = delete;
          ^
  include/llvm/IR/Instructions.h:2233:9: note: candidate function not viable: requires single argument 's', but 2 arguments were provided
    void *operator new(size_t s) {

After the patch

  lib/AsmParser/LLParser.cpp:5822:10: error: no matching function for call to 'operator new'
    Inst = new (3) ShuffleVectorInst(Op0, Op1, Op2);
           ^   ~~~
  include/llvm/IR/Instructions.h:2225:9: note: candidate function not viable: requires single argument 's', but 2 arguments were provided
    void *operator new(size_t s) {


https://reviews.llvm.org/D34120





More information about the llvm-commits mailing list