diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2015-09-09 18:38:30 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2015-09-09 18:38:30 +0000 |
| commit | 66dcafc3d6cc5b585e43a9c9b8bdd40eb710262b (patch) | |
| tree | aff243aa3151c276c0f65f00ab29bd8f4e33a13b /llvm | |
| parent | 1132152db44c44add40be000ca838db02d778108 (diff) | |
| download | bcm5719-llvm-66dcafc3d6cc5b585e43a9c9b8bdd40eb710262b.tar.gz bcm5719-llvm-66dcafc3d6cc5b585e43a9c9b8bdd40eb710262b.zip | |
allow unpredictable metadata on switch statements
llvm-svn: 247174
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/IR/IRBuilder.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h index 778a58a8b87..a515e165c50 100644 --- a/llvm/include/llvm/IR/IRBuilder.h +++ b/llvm/include/llvm/IR/IRBuilder.h @@ -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 |

