commit | 769951f6cc6323821ce1e9f46a37817a541c884f | [log] [tgz] |
---|---|---|
author | Evan Cheng <evan.cheng@apple.com> | Mon Jul 02 22:39:56 2012 +0000 |
committer | Evan Cheng <evan.cheng@apple.com> | Mon Jul 02 22:39:56 2012 +0000 |
tree | 3a17953abfc70ac0085469191f4d130b199ae417 | |
parent | 1b055ce320fa13f6f1ac81670d11b45e01f79876 [diff] [blame] |
Target option DisableJumpTables is a gross hack. Move it to TargetLowering instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159611 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 4fd95e9..2d07407 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2052,7 +2052,7 @@ } static inline bool areJTsAllowed(const TargetLowering &TLI) { - return !TLI.getTargetMachine().Options.DisableJumpTables && + return TLI.supportJumpTables() && (TLI.isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) || TLI.isOperationLegalOrCustom(ISD::BRIND, MVT::Other)); }