diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-25 15:39:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-25 15:39:05 +0000 |
commit | b2e80a69514485c36442ea849063313e6db13e09 (patch) | |
tree | 9465c80582a0be6325203a1786cfb599e26c52ec | |
parent | 2440db2cb46a9d51e891e03dd2f9541f6ea966c5 (diff) |
Avoid warning: control reaches end of non-void function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3081 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/iTerminators.h | 1 | ||||
-rw-r--r-- | lib/VMCore/BasicBlock.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h index 9a421527b5..9a92ba0303 100644 --- a/include/llvm/iTerminators.h +++ b/include/llvm/iTerminators.h @@ -49,6 +49,7 @@ public: virtual const BasicBlock *getSuccessor(unsigned idx) const { assert(0 && "ReturnInst has no successors!"); abort(); + return 0; } virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) { assert(0 && "ReturnInst has no successors!"); diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index 446af17be1..d0859f8743 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -20,7 +20,10 @@ struct DummyInst : public Instruction { DummyInst() : Instruction(Type::VoidTy, NumOtherOps) {} - virtual Instruction *clone() const { assert(0 && "Cannot clone EOL");abort();} + virtual Instruction *clone() const { + assert(0 && "Cannot clone EOL");abort(); + return 0; + } virtual const char *getOpcodeName() const { return "*end-of-list-inst*"; } // Methods for support type inquiry through isa, cast, and dyn_cast... |