[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Apr 16 15:22:28 PDT 2003
Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.81 -> 1.82
---
Log message:
Improve the efficiency and cleanup writing a bit
---
Diffs of the changes:
Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.81 llvm/lib/VMCore/AsmWriter.cpp:1.82
--- llvm/lib/VMCore/AsmWriter.cpp:1.81 Thu Mar 6 17:23:32 2003
+++ llvm/lib/VMCore/AsmWriter.cpp Wed Apr 16 15:20:02 2003
@@ -804,20 +804,22 @@
bool PrintAllTypes = false;
const Type *TheType = Operand->getType();
- for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {
- Operand = I.getOperand(i);
- if (Operand->getType() != TheType) {
- PrintAllTypes = true; // We have differing types! Print them all!
- break;
+ // Shift Left & Right print both types even for Ubyte LHS
+ if (isa<ShiftInst>(I)) {
+ PrintAllTypes = true;
+ } else {
+ for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {
+ Operand = I.getOperand(i);
+ if (Operand->getType() != TheType) {
+ PrintAllTypes = true; // We have differing types! Print them all!
+ break;
+ }
}
}
-
- // Shift Left & Right print both types even for Ubyte LHS
- if (isa<ShiftInst>(I)) PrintAllTypes = true;
-
+
if (!PrintAllTypes) {
Out << " ";
- printType(I.getOperand(0)->getType());
+ printType(TheType);
}
for (unsigned i = 0, E = I.getNumOperands(); i != E; ++i) {
More information about the llvm-commits
mailing list