]> granicus.if.org Git - clang/commitdiff
Add a comment on SetGlobalValueAttributes.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 14 Apr 2009 06:19:49 +0000 (06:19 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 14 Apr 2009 06:19:49 +0000 (06:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index be6ba2338a16c11642b3f6909889ca33df653dc2..1dafd39b2c1a51e163b49c7cfc6a9993e4038703 100644 (file)
@@ -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
+    // subsequent RAUW.
     if (D->hasAttr<UsedAttr>())
       AddUsedGlobal(GV);
   }