| OLD | NEW |
| 1 //===- subzero/src/IceELFSection.cpp - Representation of ELF sections -----===// | 1 //===- subzero/src/IceELFSection.cpp - Representation of ELF sections -----===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file defines how ELF sections are represented. | 10 // This file defines how ELF sections are represented. |
| 11 // | 11 // |
| 12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
| 13 | 13 |
| 14 #include "IceELFSection.h" | 14 #include "IceELFSection.h" |
| 15 | 15 |
| 16 #include "IceDefs.h" | 16 #include "IceDefs.h" |
| 17 #include "IceELFStreamer.h" | 17 #include "IceELFStreamer.h" |
| 18 |
| 19 #pragma clang diagnostic push |
| 20 #pragma clang diagnostic ignored "-Wunused-parameter" |
| 21 #pragma clang diagnostic ignored "-Wshadow" |
| 18 #include "llvm/Support/MathExtras.h" | 22 #include "llvm/Support/MathExtras.h" |
| 23 #pragma clang diagnostic pop |
| 19 | 24 |
| 20 using namespace llvm::ELF; | 25 using namespace llvm::ELF; |
| 21 | 26 |
| 22 namespace Ice { | 27 namespace Ice { |
| 23 | 28 |
| 24 // Text sections. | 29 // Text sections. |
| 25 | 30 |
| 26 void ELFTextSection::appendData(ELFStreamer &Str, | 31 void ELFTextSection::appendData(ELFStreamer &Str, |
| 27 const llvm::StringRef MoreData) { | 32 const llvm::StringRef MoreData) { |
| 28 Str.writeBytes(MoreData); | 33 Str.writeBytes(MoreData); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 continue; | 218 continue; |
| 214 } | 219 } |
| 215 StringIndex.second = StringData.size(); | 220 StringIndex.second = StringData.size(); |
| 216 std::copy(Cur.begin(), Cur.end(), back_inserter(StringData)); | 221 std::copy(Cur.begin(), Cur.end(), back_inserter(StringData)); |
| 217 StringData.push_back(0); | 222 StringData.push_back(0); |
| 218 Prev = Cur; | 223 Prev = Cur; |
| 219 } | 224 } |
| 220 } | 225 } |
| 221 | 226 |
| 222 } // end of namespace Ice | 227 } // end of namespace Ice |
| OLD | NEW |