summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MIParser.cpp
diff options
context:
space:
mode:
authorGeoff Berry <gberry@codeaurora.org>2016-11-18 19:37:24 +0000
committerGeoff Berry <gberry@codeaurora.org>2016-11-18 19:37:24 +0000
commitb51774ac8ca27bb4705a61754781382fadbd1f22 (patch)
treec083a2a54522a3753af638244397120680114faa /llvm/lib/CodeGen/MIRParser/MIParser.cpp
parent2a3d10ae613af37491fd81747ec418d2d93635b0 (diff)
downloadbcm5719-llvm-b51774ac8ca27bb4705a61754781382fadbd1f22.tar.gz
bcm5719-llvm-b51774ac8ca27bb4705a61754781382fadbd1f22.zip
[MIRPrinter] Print raw branch probabilities as expected by MIRParser
Fixes PR28751. Reviewers: MatzeB, qcolombet Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D26775 llvm-svn: 287368
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index 236b59121cf..1b611fbbe62 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -488,7 +488,8 @@ bool MIParser::parseBasicBlockSuccessors(MachineBasicBlock &MBB) {
lex();
unsigned Weight = 0;
if (consumeIfPresent(MIToken::lparen)) {
- if (Token.isNot(MIToken::IntegerLiteral))
+ if (Token.isNot(MIToken::IntegerLiteral) &&
+ Token.isNot(MIToken::HexLiteral))
return error("expected an integer literal after '('");
if (getUnsigned(Weight))
return true;
OpenPOWER on IntegriCloud