[llvm-commits] [llvm] r74255 - in /llvm/trunk: lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp test/Feature/mdnode.ll
Devang Patel
dpatel at apple.com
Thu Jun 25 19:26:13 PDT 2009
Author: dpatel
Date: Thu Jun 25 21:26:12 2009
New Revision: 74255
URL: http://llvm.org/viewvc/llvm-project?rev=74255&view=rev
Log:
Let's ignore MDStrings also!
Modified:
llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/test/Feature/mdnode.ll
Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -924,7 +924,7 @@
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
const Type *Type = C->getType();
unsigned Size = TD->getTypeAllocSize(Type);
Modified: llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -223,7 +223,7 @@
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
unsigned Size = TD->getTypeAllocSize(C->getType());
unsigned Align = TD->getPreferredAlignmentLog(GVar);
Modified: llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -522,7 +522,7 @@
printVisibility(name, GVar->getVisibility());
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
const Type *Type = C->getType();
unsigned Size = TD->getTypeAllocSize(Type);
Modified: llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -270,7 +270,7 @@
O << "\n\n";
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
unsigned Size = TD->getTypeAllocSize(C->getType());
unsigned Align = TD->getPreferredAlignmentLog(GVar);
Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -484,7 +484,7 @@
O << "\n\n";
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
const Type *CTy = C->getType();
unsigned Size = TD->getTypeAllocSize(CTy);
Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -657,7 +657,7 @@
printVisibility(name, GVar->getVisibility());
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
const Type *Type = C->getType();
unsigned Size = TD->getTypeAllocSize(Type);
Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -254,7 +254,7 @@
O << "\n\n";
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
unsigned Size = TD->getTypeAllocSize(C->getType());
unsigned Align = TD->getPreferredAlignment(GVar);
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Thu Jun 25 21:26:12 2009
@@ -958,7 +958,7 @@
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- if (isa<MDNode>(C))
+ if (isa<MDNode>(C) || isa<MDString>(C))
return;
const Type *Type = C->getType();
unsigned Size = TD->getTypeAllocSize(Type);
Modified: llvm/trunk/test/Feature/mdnode.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/mdnode.ll?rev=74255&r1=74254&r2=74255&view=diff
==============================================================================
--- llvm/trunk/test/Feature/mdnode.ll (original)
+++ llvm/trunk/test/Feature/mdnode.ll Thu Jun 25 21:26:12 2009
@@ -1,2 +1,4 @@
; RUN: llvm-as < %s | llc -f -o /dev/null
- at llvm.foo = constant metadata !{i17 123, null, metadata !"foobar"}
\ No newline at end of file
+ at llvm.foo = constant metadata !{i17 123, null, metadata !"foobar"}
+ at llvm.bar = constant metadata !"barbar"
+
More information about the llvm-commits
mailing list