[cfe-commits] r69029 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Daniel Dunbar daniel at zuster.org
Mon Apr 13 23:19:49 PDT 2009


Author: ddunbar
Date: Tue Apr 14 01:19:49 2009
New Revision: 69029

URL: http://llvm.org/viewvc/llvm-project?rev=69029&view=rev
Log:
Add a comment on SetGlobalValueAttributes.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=69029&r1=69028&r2=69029&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Apr 14 01:19:49 2009
@@ -221,6 +221,11 @@
   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 @@
     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);
   }





More information about the cfe-commits mailing list