summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-21 08:24:40 +0000
committerChris Lattner <sabre@nondot.org>2009-03-21 08:24:40 +0000
commit6574906818d4cf851525aabe415379aa7617f978 (patch)
tree20dc56b607b30dbfed6e67f0f91e0a221e76ebfc /clang/lib/CodeGen/CodeGenModule.cpp
parent64c55933ed88e2692811edbfb55a7a4148f3d021 (diff)
downloadbcm5719-llvm-6574906818d4cf851525aabe415379aa7617f978.tar.gz
bcm5719-llvm-6574906818d4cf851525aabe415379aa7617f978.zip
fix several problems with asm renaming, by pulling it into the mangling code:
1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo") 2. multiple definitions were conflicting, they weren't getting merged. 3. the code was duplicated in several places. llvm-svn: 67442
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index c46db96bad6..97f989dbe38 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -305,11 +305,6 @@ void CodeGenModule::SetGlobalValueAttributes(const Decl *D,
setGlobalVisibility(GV, attr->getVisibility());
// FIXME: else handle -fvisibility
- // Prefaced with special LLVM marker to indicate that the name
- // should not be munged.
- if (const AsmLabelAttr *ALA = D->getAttr<AsmLabelAttr>())
- GV->setName("\01" + ALA->getLabel());
-
if (const SectionAttr *SA = D->getAttr<SectionAttr>())
GV->setSection(SA->getName());
@@ -629,12 +624,6 @@ void CodeGenModule::EmitGlobalDefinition(const ValueDecl *D) {
if (D->getAttr<WeakAttr>() || D->getAttr<WeakImportAttr>())
GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
- // FIXME: This should be handled by the mangler!
- if (const AsmLabelAttr *ALA = D->getAttr<AsmLabelAttr>()) {
- // Prefaced with special LLVM marker to indicate that the name
- // should not be munged.
- GV->setName("\01" + ALA->getLabel());
- }
return Entry = GV;
}
@@ -746,13 +735,6 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) {
setGlobalVisibility(GV, attr->getVisibility());
// FIXME: else handle -fvisibility
- // FIXME: This should be a mangling issue.
- if (const AsmLabelAttr *ALA = D->getAttr<AsmLabelAttr>()) {
- // Prefaced with special LLVM marker to indicate that the name
- // should not be munged.
- GV->setName("\01" + ALA->getLabel());
- }
-
// Set the llvm linkage type as appropriate.
if (D->getStorageClass() == VarDecl::Static)
GV->setLinkage(llvm::Function::InternalLinkage);
OpenPOWER on IntegriCloud