summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit313570fb17979bd48607362272f2aafc3d8ddad7 (patch)
tree4745b1f551bd02d9cd6441494d27c017daeb2056 /llvm/lib/CodeGen/MachineDebugInfo.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/MachineDebugInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineDebugInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineDebugInfo.cpp b/llvm/lib/CodeGen/MachineDebugInfo.cpp
index ba5bf03b96f..9e76daa4b78 100644
--- a/llvm/lib/CodeGen/MachineDebugInfo.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud