forked from OSchip/llvm-project
				
			[AccelTable] Try making MSVC happy
MSVC complains that the constexpr "expression did not evaluate to a constant". Trying to make it happy by adding a `const` specifier as suggested in https://stackoverflow.com/questions/37574343. llvm-svn: 323659
This commit is contained in:
		
							parent
							
								
									278e2d1a26
								
							
						
					
					
						commit
						ba8daf0964
					
				| 
						 | 
				
			
			@ -368,7 +368,7 @@ public:
 | 
			
		|||
 | 
			
		||||
  void emit(AsmPrinter *Asm) const override;
 | 
			
		||||
 | 
			
		||||
  static constexpr AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
  static constexpr const AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
      AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset,
 | 
			
		||||
                                  dwarf::DW_FORM_data4)};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -391,7 +391,7 @@ public:
 | 
			
		|||
 | 
			
		||||
  void emit(AsmPrinter *Asm) const override;
 | 
			
		||||
 | 
			
		||||
  static constexpr AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
  static constexpr const AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
      AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset,
 | 
			
		||||
                                  dwarf::DW_FORM_data4),
 | 
			
		||||
      AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
 | 
			
		||||
| 
						 | 
				
			
			@ -414,7 +414,7 @@ public:
 | 
			
		|||
 | 
			
		||||
  void emit(AsmPrinter *Asm) const override;
 | 
			
		||||
 | 
			
		||||
  static constexpr AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
  static constexpr const AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
      AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset,
 | 
			
		||||
                                  dwarf::DW_FORM_data4)};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -443,7 +443,7 @@ public:
 | 
			
		|||
 | 
			
		||||
  void emit(AsmPrinter *Asm) const override;
 | 
			
		||||
 | 
			
		||||
  static constexpr AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
  static constexpr const AppleAccelTableHeader::Atom Atoms[] = {
 | 
			
		||||
      AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset,
 | 
			
		||||
                                  dwarf::DW_FORM_data4),
 | 
			
		||||
      AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,10 +70,10 @@ void AppleAccelTableHeader::setBucketAndHashCount(uint32_t HashCount) {
 | 
			
		|||
  Header.HashCount = HashCount;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
constexpr AppleAccelTableHeader::Atom AppleAccelTableTypeData::Atoms[];
 | 
			
		||||
constexpr AppleAccelTableHeader::Atom AppleAccelTableOffsetData::Atoms[];
 | 
			
		||||
constexpr AppleAccelTableHeader::Atom AppleAccelTableStaticOffsetData::Atoms[];
 | 
			
		||||
constexpr AppleAccelTableHeader::Atom AppleAccelTableStaticTypeData::Atoms[];
 | 
			
		||||
constexpr const AppleAccelTableHeader::Atom AppleAccelTableTypeData::Atoms[];
 | 
			
		||||
constexpr const AppleAccelTableHeader::Atom AppleAccelTableOffsetData::Atoms[];
 | 
			
		||||
constexpr const AppleAccelTableHeader::Atom AppleAccelTableStaticOffsetData::Atoms[];
 | 
			
		||||
constexpr const AppleAccelTableHeader::Atom AppleAccelTableStaticTypeData::Atoms[];
 | 
			
		||||
 | 
			
		||||
void AppleAccelTableBase::emitHeader(AsmPrinter *Asm) { Header.emit(Asm); }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue