[llvm-commits] CVS: llvm/lib/Target/X86/MachineCodeEmitter.cpp Printer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Dec 4 11:34:01 PST 2002
Changes in directory llvm/lib/Target/X86:
MachineCodeEmitter.cpp updated: 1.5 -> 1.6
Printer.cpp updated: 1.22 -> 1.23
---
Log message:
Fix bogus assertion failures
---
Diffs of the changes:
Index: llvm/lib/Target/X86/MachineCodeEmitter.cpp
diff -u llvm/lib/Target/X86/MachineCodeEmitter.cpp:1.5 llvm/lib/Target/X86/MachineCodeEmitter.cpp:1.6
--- llvm/lib/Target/X86/MachineCodeEmitter.cpp:1.5 Wed Dec 4 00:45:19 2002
+++ llvm/lib/Target/X86/MachineCodeEmitter.cpp Wed Dec 4 11:32:52 2002
@@ -225,7 +225,7 @@
MCE.emitByte(BaseOpcode + getX86RegNum(MI.getOperand(0).getReg()));
if (MI.getNumOperands() == 2) {
unsigned Size = 4;
- if (Value *V = MI.getOperand(1).getVRegValue()) {
+ if (Value *V = MI.getOperand(1).getVRegValueOrNull()) {
assert(Size == 4 && "Don't know how to emit non-pointer values!");
MCE.emitGlobalAddress(cast<GlobalValue>(V));
} else {
Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.22 llvm/lib/Target/X86/Printer.cpp:1.23
--- llvm/lib/Target/X86/Printer.cpp:1.22 Wed Dec 4 11:28:40 2002
+++ llvm/lib/Target/X86/Printer.cpp Wed Dec 4 11:32:52 2002
@@ -96,7 +96,7 @@
const MRegisterInfo &RI) {
switch (MO.getType()) {
case MachineOperand::MO_VirtualRegister:
- if (Value *V = MO.getVRegValue()) {
+ if (Value *V = MO.getVRegValueOrNull()) {
O << "<" << V->getName() << ">";
return;
}
More information about the llvm-commits
mailing list