diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 06:19:49 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 06:19:49 +0000 |
commit | 29eff88fc800c7aad00dc39c261cbba3df360ba2 (patch) | |
tree | e01ca083b9839c00ea7713427dad4e98816a3022 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 3e031f4121947041d2fe907c5e47cb7b71abd6e2 (diff) | |
download | bcm5719-llvm-29eff88fc800c7aad00dc39c261cbba3df360ba2.tar.gz bcm5719-llvm-29eff88fc800c7aad00dc39c261cbba3df360ba2.zip |
Add a comment on SetGlobalValueAttributes.
llvm-svn: 69029
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index be6ba2338a1..1dafd39b2c1 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -221,6 +221,11 @@ void CodeGenModule::EmitAnnotations() { gv->setSection("llvm.metadata"); } +/// SetGlobalValueAttributes - Set attributes for a global. +/// +/// FIXME: This is currently only done for aliases and functions, but +/// not for variables (these details are set in +/// EmitGlobalVarDefinition for variables). void CodeGenModule::SetGlobalValueAttributes(const Decl *D, GVALinkage Linkage, llvm::GlobalValue *GV, @@ -265,8 +270,8 @@ void CodeGenModule::SetGlobalValueAttributes(const Decl *D, setGlobalVisibility(GV, D); // Only add to llvm.used when we see a definition, otherwise we - // might add multiple times or risk the value being replaced by a - // subsequent RAUW. + // might add it multiple times or risk the value being replaced by + // a subsequent RAUW. if (D->hasAttr<UsedAttr>()) AddUsedGlobal(GV); } |