Lines Matching refs:GV
349 static unsigned getEncodedLinkage(const GlobalValue *GV) {
350 switch (GV->getLinkage()) {
371 static unsigned getEncodedVisibility(const GlobalValue *GV) {
372 switch (GV->getVisibility()) {
380 static unsigned getEncodedThreadLocalMode(const GlobalVariable *GV) {
381 switch (GV->getThreadLocalMode()) {
413 for (Module::const_global_iterator GV = M->global_begin(),E = M->global_end();
414 GV != E; ++GV) {
415 MaxAlignment = std::max(MaxAlignment, GV->getAlignment());
416 MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV->getType()));
417 if (GV->hasSection()) {
419 unsigned &Entry = SectionMap[GV->getSection()];
421 WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, GV->getSection(),
478 for (Module::const_global_iterator GV = M->global_begin(),E = M->global_end();
479 GV != E; ++GV) {
485 Vals.push_back(VE.getTypeID(GV->getType()));
486 Vals.push_back(GV->isConstant());
487 Vals.push_back(GV->isDeclaration() ? 0 :
488 (VE.getValueID(GV->getInitializer()) + 1));
489 Vals.push_back(getEncodedLinkage(GV));
490 Vals.push_back(Log2_32(GV->getAlignment())+1);
491 Vals.push_back(GV->hasSection() ? SectionMap[GV->getSection()] : 0);
492 if (GV->isThreadLocal() ||
493 GV->getVisibility() != GlobalValue::DefaultVisibility ||
494 GV->hasUnnamedAddr() || GV->isExternallyInitialized()) {
495 Vals.push_back(getEncodedVisibility(GV));
496 Vals.push_back(getEncodedThreadLocalMode(GV));
497 Vals.push_back(GV->hasUnnamedAddr());
498 Vals.push_back(GV->isExternallyInitialized());