diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-03-07 22:00:35 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-03-07 22:00:35 +0000 |
commit | 313570fb17979bd48607362272f2aafc3d8ddad7 (patch) | |
tree | 4745b1f551bd02d9cd6441494d27c017daeb2056 /llvm/lib/CodeGen/AsmPrinter.cpp | |
parent | 69effa2325093baadce32f49ebe157c46d68348d (diff) | |
download | bcm5719-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.cpp | 8 |
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. |