[llvm-commits] [llvm] r97252 - in /llvm/trunk/include/llvm/CodeGen: MachineInstrBuilder.h MachineOperand.h
Dale Johannesen
dalej at apple.com
Fri Feb 26 11:39:56 PST 2010
Author: johannes
Date: Fri Feb 26 13:39:56 2010
New Revision: 97252
URL: http://llvm.org/viewvc/llvm-project?rev=97252&view=rev
Log:
Further constify MDNode* references.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
llvm/trunk/include/llvm/CodeGen/MachineOperand.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=97252&r1=97251&r2=97252&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Fri Feb 26 13:39:56 2010
@@ -127,7 +127,7 @@
return *this;
}
- const MachineInstrBuilder &addMetadata(MDNode *MD) const {
+ const MachineInstrBuilder &addMetadata(const MDNode *MD) const {
MI->addOperand(MachineOperand::CreateMetadata(MD));
return *this;
}
Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=97252&r1=97251&r2=97252&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Fri Feb 26 13:39:56 2010
@@ -100,7 +100,7 @@
MachineBasicBlock *MBB; // For MO_MachineBasicBlock.
const ConstantFP *CFP; // For MO_FPImmediate.
int64_t ImmVal; // For MO_Immediate.
- MDNode *MD; // For MO_Metadata.
+ const MDNode *MD; // For MO_Metadata.
struct { // For MO_Register.
unsigned RegNo;
@@ -467,7 +467,7 @@
Op.setTargetFlags(TargetFlags);
return Op;
}
- static MachineOperand CreateMetadata(MDNode *Meta) {
+ static MachineOperand CreateMetadata(const MDNode *Meta) {
MachineOperand Op(MachineOperand::MO_Metadata);
Op.Contents.MD = Meta;
return Op;
More information about the llvm-commits
mailing list