[llvm-commits] [llvm] r103276 - in /llvm/trunk/lib: Analysis/DebugInfo.cpp Target/PIC16/PIC16DebugInfo.cpp Target/X86/AsmPrinter/X86MCInstLower.cpp Transforms/Utils/CloneFunction.cpp Transforms/Utils/PromoteMemoryToRegister.cpp
Devang Patel
dpatel at apple.com
Fri May 7 11:19:32 PDT 2010
Author: dpatel
Date: Fri May 7 13:19:32 2010
New Revision: 103276
URL: http://llvm.org/viewvc/llvm-project?rev=103276&view=rev
Log:
Use overloaded operators instead of DIDescriptor::getNode()
Modified:
llvm/trunk/lib/Analysis/DebugInfo.cpp
llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=103276&r1=103275&r2=103276&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Fri May 7 13:19:32 2010
@@ -271,7 +271,7 @@
// which, due to uniquing, has merged with the source. We shield clients from
// this detail by allowing a value to be replaced with replaceAllUsesWith()
// itself.
- if (getNode() != D) {
+ if (DbgNode != D) {
MDNode *Node = DbgNode;
Node->replaceAllUsesWith(D);
Node->destroy();
Modified: llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp?rev=103276&r1=103275&r2=103276&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp Fri May 7 13:19:32 2010
@@ -70,7 +70,7 @@
// We also need to encode the information about the base type of
// pointer in TypeNo.
- DIType BaseType = DIDerivedType(Ty.getNode()).getTypeDerivedFrom();
+ DIType BaseType = DIDerivedType(Ty).getTypeDerivedFrom();
PopulateDebugInfo(BaseType, TypeNo, HasAux, Aux, TagName);
}
@@ -79,7 +79,7 @@
bool &HasAux, int Aux[],
std::string &TagName) {
- DICompositeType CTy = DICompositeType(Ty.getNode());
+ DICompositeType CTy = DICompositeType(Ty);
DIArray Elements = CTy.getTypeArray();
unsigned short size = 1;
unsigned short Dimension[4]={0,0,0,0};
@@ -88,7 +88,7 @@
if (Element.getTag() == dwarf::DW_TAG_subrange_type) {
TypeNo = TypeNo << PIC16Dbg::S_DERIVED;
TypeNo = TypeNo | PIC16Dbg::DT_ARY;
- DISubrange SubRange = DISubrange(Element.getNode());
+ DISubrange SubRange = DISubrange(Element);
Dimension[i] = SubRange.getHi() - SubRange.getLo() + 1;
// Each dimension is represented by 2 bytes starting at byte 9.
Aux[8+i*2+0] = Dimension[i];
@@ -111,7 +111,7 @@
unsigned short &TypeNo,
bool &HasAux, int Aux[],
std::string &TagName) {
- DICompositeType CTy = DICompositeType(Ty.getNode());
+ DICompositeType CTy = DICompositeType(Ty);
TypeNo = TypeNo << PIC16Dbg::S_BASIC;
if (Ty.getTag() == dwarf::DW_TAG_structure_type)
TypeNo = TypeNo | PIC16Dbg::T_STRUCT;
@@ -124,7 +124,7 @@
// llvm.dbg.composite* global variable. Since we need to revisit
// PIC16DebugInfo implementation anyways after the MDNodes based
// framework is done, let us continue with the way it is.
- std::string UniqueSuffix = "." + Ty.getNode()->getNameStr().substr(18);
+ std::string UniqueSuffix = "." + Ty->getNameStr().substr(18);
TagName += UniqueSuffix;
unsigned short size = CTy.getSizeInBits()/8;
// 7th and 8th byte represent size.
@@ -303,7 +303,7 @@
bool HasAux = false;
int ElementAux[PIC16Dbg::AuxSize] = { 0 };
std::string TagName = "";
- DIDerivedType DITy(Element.getNode());
+ DIDerivedType DITy(Element);
unsigned short ElementSize = DITy.getSizeInBits()/8;
// Get mangleddd name for this structure/union element.
std::string MangMemName = DITy.getName().str() + SuffixNo;
@@ -336,7 +336,7 @@
CTy.getTag() == dwarf::DW_TAG_structure_type ) {
// Get the number after llvm.dbg.composite and make UniqueSuffix from
// it.
- std::string DIVar = CTy.getNode()->getNameStr();
+ std::string DIVar = CTy->getNameStr();
std::string UniqueSuffix = "." + DIVar.substr(18);
std::string MangledCTyName = CTy.getName().str() + UniqueSuffix;
unsigned short size = CTy.getSizeInBits()/8;
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=103276&r1=103275&r2=103276&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Fri May 7 13:19:32 2010
@@ -346,7 +346,7 @@
// cast away const; DIetc do not take const operands for some reason.
DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata()));
if (V.getContext().isSubprogram())
- O << DISubprogram(V.getContext().getNode()).getDisplayName() << ":";
+ O << DISubprogram(V.getContext()).getDisplayName() << ":";
O << V.getName();
O << " <- ";
// Frame address. Currently handles register +- offset only.
Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=103276&r1=103275&r2=103276&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Fri May 7 13:19:32 2010
@@ -344,7 +344,7 @@
DILocation OrigLocation = ILoc.getOrigLocation();
MDNode *NewLoc = TheCallMD;
if (OrigLocation.Verify())
- NewLoc = UpdateInlinedAtInfo(OrigLocation.getNode(), TheCallMD);
+ NewLoc = UpdateInlinedAtInfo(OrigLocation, TheCallMD);
Value *MDVs[] = {
InsnMD->getOperand(0), // Line
Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=103276&r1=103275&r2=103276&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Fri May 7 13:19:32 2010
@@ -886,7 +886,7 @@
void PromoteMem2Reg::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
StoreInst *SI) {
DIVariable DIVar(DDI->getVariable());
- if (!DIVar.getNode())
+ if (!DIVar)
return;
if (!DIF)
More information about the llvm-commits
mailing list