[llvm-commits] [dragonegg] r137936 - /dragonegg/trunk/src/Constants.cpp
Duncan Sands
baldrick at free.fr
Thu Aug 18 04:47:00 PDT 2011
Author: baldrick
Date: Thu Aug 18 06:47:00 2011
New Revision: 137936
URL: http://llvm.org/viewvc/llvm-project?rev=137936&view=rev
Log:
Use linker private linkage rather than private linkage for constants.
I have no idea what the difference is, I am just following clang.
While there, mark these constants "unnamed_addr" if constant merging
is enabled.
Modified:
dragonegg/trunk/src/Constants.cpp
Modified: dragonegg/trunk/src/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Constants.cpp?rev=137936&r1=137935&r2=137936&view=diff
==============================================================================
--- dragonegg/trunk/src/Constants.cpp (original)
+++ dragonegg/trunk/src/Constants.cpp Thu Aug 18 06:47:00 2011
@@ -1398,12 +1398,13 @@
// Create a new global variable.
Slot = new GlobalVariable(*TheModule, Init->getType(), true,
- GlobalVariable::PrivateLinkage, Init, ".cst");
+ GlobalVariable::LinkerPrivateLinkage, Init, ".cst");
unsigned align = TYPE_ALIGN(TREE_TYPE(exp));
#ifdef CONSTANT_ALIGNMENT
align = CONSTANT_ALIGNMENT(exp, align);
#endif
Slot->setAlignment(align);
+ Slot->setUnnamedAddr(flag_merge_constants);
return Slot;
}
More information about the llvm-commits
mailing list