summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-03-07 22:00:35 +0000
committerJim Laskey <jlaskey@mac.com>2006-03-07 22:00:35 +0000
commit313570fb17979bd48607362272f2aafc3d8ddad7 (patch)
tree4745b1f551bd02d9cd6441494d27c017daeb2056 /llvm/lib/CodeGen/AsmPrinter.cpp
parent69effa2325093baadce32f49ebe157c46d68348d (diff)
downloadbcm5719-llvm-313570fb17979bd48607362272f2aafc3d8ddad7.tar.gz
bcm5719-llvm-313570fb17979bd48607362272f2aafc3d8ddad7.zip
Use "llvm.metadata" section for debug globals. Filter out these globals in the
asm printer. llvm-svn: 26599
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index dfac3c07788..11c6f231b9f 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -131,8 +131,12 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
/// special global used by LLVM. If so, emit it and return true, otherwise
/// do nothing and return false.
bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
- assert(GV->hasInitializer() && GV->hasAppendingLinkage() &&
- "Not a special LLVM global!");
+ // Ignore debug and non-emitted data.
+ if (GV->getSection() == "llvm.metadata") return true;
+
+ if (!GV->hasAppendingLinkage()) return false;
+
+ assert(GV->hasInitializer() && "Not a special LLVM global!");
if (GV->getName() == "llvm.used")
return true; // No need to emit this at all.
OpenPOWER on IntegriCloud