mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 15:33:16 +00:00
allow unpredictable metadata on switch statements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af5ff60200
commit
97878fcf7d
@ -632,10 +632,10 @@ public:
|
||||
/// and with a hint for the number of cases that will be added (for efficient
|
||||
/// allocation).
|
||||
SwitchInst *CreateSwitch(Value *V, BasicBlock *Dest, unsigned NumCases = 10,
|
||||
MDNode *BranchWeights = nullptr) {
|
||||
// TODO: Add unpredictable metadata for a switch.
|
||||
MDNode *BranchWeights = nullptr,
|
||||
MDNode *Unpredictable = nullptr) {
|
||||
return Insert(addBranchMetadata(SwitchInst::Create(V, Dest, NumCases),
|
||||
BranchWeights, nullptr));
|
||||
BranchWeights, Unpredictable));
|
||||
}
|
||||
|
||||
/// \brief Create an indirect branch instruction with the specified address
|
||||
|
Loading…
Reference in New Issue
Block a user