diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-02-05 08:31:47 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-02-05 08:31:47 +0000 |
commit | ee4dab5f1f7a0c32167b8b91c5733e77d4d88dcc (patch) | |
tree | 7b4e14db824575afe72d6a34318487575bc7407b /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | ebd90c58e6d2b9aff85a4bd8ee9e98acbbbf4cb0 (diff) | |
download | bcm5719-llvm-ee4dab5f1f7a0c32167b8b91c5733e77d4d88dcc.tar.gz bcm5719-llvm-ee4dab5f1f7a0c32167b8b91c5733e77d4d88dcc.zip |
Convert assert(0) to llvm_unreachable
llvm-svn: 149816
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 8195f9f6790..8bef55effa2 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -528,6 +528,7 @@ unsigned MachineJumpTableInfo::getEntrySize(const TargetData &TD) const { // The size of a jump table entry is 4 bytes unless the entry is just the // address of a block, in which case it is the pointer size. switch (getEntryKind()) { + default: llvm_unreachable("Unknown jump table encoding!"); case MachineJumpTableInfo::EK_BlockAddress: return TD.getPointerSize(); case MachineJumpTableInfo::EK_GPRel64BlockAddress: @@ -539,8 +540,6 @@ unsigned MachineJumpTableInfo::getEntrySize(const TargetData &TD) const { case MachineJumpTableInfo::EK_Inline: return 0; } - assert(0 && "Unknown jump table encoding!"); - return ~0; } /// getEntryAlignment - Return the alignment of each entry in the jump table. @@ -549,6 +548,7 @@ unsigned MachineJumpTableInfo::getEntryAlignment(const TargetData &TD) const { // entry is just the address of a block, in which case it is the pointer // alignment. switch (getEntryKind()) { + default: llvm_unreachable("Unknown jump table encoding!"); case MachineJumpTableInfo::EK_BlockAddress: return TD.getPointerABIAlignment(); case MachineJumpTableInfo::EK_GPRel64BlockAddress: @@ -560,8 +560,6 @@ unsigned MachineJumpTableInfo::getEntryAlignment(const TargetData &TD) const { case MachineJumpTableInfo::EK_Inline: return 1; } - assert(0 && "Unknown jump table encoding!"); - return ~0; } /// createJumpTableIndex - Create a new jump table entry in the jump table info. |