Lines Matching refs:GV
344 static unsigned getEncodedLinkage(const GlobalValue &GV) { in getEncodedLinkage() argument
345 switch (GV.getLinkage()) { in getEncodedLinkage()
372 static unsigned getEncodedVisibility(const GlobalValue &GV) { in getEncodedVisibility() argument
373 switch (GV.getVisibility()) { in getEncodedVisibility()
381 static unsigned getEncodedThreadLocalMode(const GlobalVariable &GV) { in getEncodedThreadLocalMode() argument
382 switch (GV.getThreadLocalMode()) { in getEncodedThreadLocalMode()
414 for (const GlobalValue &GV : M->globals()) { in WriteModuleInfo() local
415 MaxAlignment = std::max(MaxAlignment, GV.getAlignment()); in WriteModuleInfo()
416 MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getType())); in WriteModuleInfo()
417 if (GV.hasSection()) { in WriteModuleInfo()
419 unsigned &Entry = SectionMap[GV.getSection()]; in WriteModuleInfo()
421 WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, GV.getSection(), in WriteModuleInfo()
478 for (const GlobalVariable &GV : M->globals()) { in WriteModuleInfo() local
484 Vals.push_back(VE.getTypeID(GV.getType())); in WriteModuleInfo()
485 Vals.push_back(GV.isConstant()); in WriteModuleInfo()
486 Vals.push_back(GV.isDeclaration() ? 0 : in WriteModuleInfo()
487 (VE.getValueID(GV.getInitializer()) + 1)); in WriteModuleInfo()
488 Vals.push_back(getEncodedLinkage(GV)); in WriteModuleInfo()
489 Vals.push_back(Log2_32(GV.getAlignment())+1); in WriteModuleInfo()
490 Vals.push_back(GV.hasSection() ? SectionMap[GV.getSection()] : 0); in WriteModuleInfo()
491 if (GV.isThreadLocal() || in WriteModuleInfo()
492 GV.getVisibility() != GlobalValue::DefaultVisibility || in WriteModuleInfo()
493 GV.getUnnamedAddr() != GlobalValue::UnnamedAddr::None || in WriteModuleInfo()
494 GV.isExternallyInitialized()) { in WriteModuleInfo()
495 Vals.push_back(getEncodedVisibility(GV)); in WriteModuleInfo()
496 Vals.push_back(getEncodedThreadLocalMode(GV)); in WriteModuleInfo()
497 Vals.push_back(GV.getUnnamedAddr() != GlobalValue::UnnamedAddr::None); in WriteModuleInfo()
498 Vals.push_back(GV.isExternallyInitialized()); in WriteModuleInfo()