summaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/InstPrinter
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2013-06-28 21:54:25 +0000
committerRichard Trieu <rtrieu@google.com>2013-06-28 21:54:25 +0000
commitc09324483cf8c8904b7250f072d8f64e9b00656e (patch)
tree01fa2b3e0fecb81c24f9e197e95f14760871fb13 /lib/Target/Hexagon/InstPrinter
parent5d3257e37ced7dd75023bb9c4619f297374f61d6 (diff)
downloadllvm-c09324483cf8c8904b7250f072d8f64e9b00656e.tar.gz
llvm-c09324483cf8c8904b7250f072d8f64e9b00656e.tar.bz2
llvm-c09324483cf8c8904b7250f072d8f64e9b00656e.tar.xz
Fix broken asserts that never fire.
Change assert("text") to assert(0 && "text"). The first case is a const char * to bool conversion, which always evaluates to true, never triggering the assert. The second case will always trigger the assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/InstPrinter')
-rw-r--r--lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp b/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
index 36da6dfcc3..3105665c94 100644
--- a/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
+++ b/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
@@ -179,7 +179,7 @@ void HexagonInstPrinter::printBranchOperand(const MCInst *MI, unsigned OpNo,
raw_ostream &O) const {
// Branches can take an immediate operand. This is used by the branch
// selection pass to print $+8, an eight byte displacement from the PC.
- assert("Unknown branch operand.");
+ assert(0 && "Unknown branch operand.");
}
void HexagonInstPrinter::printCallOperand(const MCInst *MI, unsigned OpNo,
@@ -203,7 +203,7 @@ void HexagonInstPrinter::printSymbol(const MCInst *MI, unsigned OpNo,
O << '#';
printOperand(MI, OpNo, O);
} else {
- assert("Unknown symbol operand");
+ assert(0 && "Unknown symbol operand");
printOperand(MI, OpNo, O);
}
O << ')';