aboutsummaryrefslogtreecommitdiff
path: root/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
commit7809811e4ed3c2462efa327cef0464b9844baea2 (patch)
tree9ecd790d8e64ad0507f53798a0e5c26bfd2407df /lib/CodeGen/AsmPrinter.cpp
parente8c3e3b51c21dad94f0b427d7e0d6722e663fc64 (diff)
Use "llvm.metadata" section for debug globals. Filter out these globals in the
asm printer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index dfac3c0778..11c6f231b9 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/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.