aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineDebugInfo.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/MachineDebugInfo.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/MachineDebugInfo.cpp')
-rw-r--r--lib/CodeGen/MachineDebugInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp
index ba5bf03b96..9e76daa4b7 100644
--- a/lib/CodeGen/MachineDebugInfo.cpp
+++ b/lib/CodeGen/MachineDebugInfo.cpp
@@ -350,6 +350,7 @@ public:
GlobalValue::InternalLinkage,
CA, "llvm.dbg.array",
SR.getModule());
+ CAGV->setSection("llvm.metadata");
Constant *CAE = ConstantExpr::getCast(CAGV, EmptyTy);
Elements.push_back(CAE);
}
@@ -1193,6 +1194,7 @@ Constant *DISerializer::getString(const std::string &String) {
GlobalVariable *StrGV = new GlobalVariable(ConstStr->getType(), true,
GlobalVariable::InternalLinkage,
ConstStr, "str", M);
+ StrGV->setSection("llvm.metadata");
// Convert to generic string pointer.
Slot = ConstantExpr::getCast(StrGV, getStrPtrType());
return Slot;
@@ -1214,6 +1216,7 @@ GlobalVariable *DISerializer::Serialize(DebugInfoDesc *DD) {
// Create the GlobalVariable early to prevent infinite recursion.
GlobalVariable *GV = new GlobalVariable(Ty, true, DD->getLinkage(),
NULL, DD->getDescString(), M);
+ GV->setSection("llvm.metadata");
// Insert new GlobalVariable in DescGlobals map.
Slot = GV;