summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf2BTF.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-10-12 17:41:12 +0000
committerFangrui Song <maskray@google.com>2018-10-12 17:41:12 +0000
commit19b8fa5c5a401c2b466c09bb2de645bb6844bb6b (patch)
tree91f4233632131a250a0d06278582d4fbfd8d5c21 /llvm/lib/MC/MCDwarf2BTF.cpp
parent60422354509e189bb95c2af728a5313bc02b279c (diff)
downloadbcm5719-llvm-19b8fa5c5a401c2b466c09bb2de645bb6844bb6b.tar.gz
bcm5719-llvm-19b8fa5c5a401c2b466c09bb2de645bb6844bb6b.zip
[BPF] Don't include linux/types.h and fix style
llvm-svn: 344381
Diffstat (limited to 'llvm/lib/MC/MCDwarf2BTF.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf2BTF.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCDwarf2BTF.cpp b/llvm/lib/MC/MCDwarf2BTF.cpp
index 08a70e6f318..9809a2153ec 100644
--- a/llvm/lib/MC/MCDwarf2BTF.cpp
+++ b/llvm/lib/MC/MCDwarf2BTF.cpp
@@ -10,11 +10,11 @@
#include "MCDwarf2BTF.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCAsmInfo.h"
+#include "llvm/MC/MCBTFContext.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSectionELF.h"
-#include "llvm/MC/MCBTFContext.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include <fstream>
@@ -22,7 +22,7 @@
using namespace llvm;
void MCDwarf2BTF::addFiles(MCObjectStreamer *MCOS, std::string &FileName,
- std::vector<FileContent> &Files) {
+ std::vector<FileContent> &Files) {
std::vector<std::string> Content;
std::ifstream Inputfile(FileName);
@@ -34,9 +34,10 @@ void MCDwarf2BTF::addFiles(MCObjectStreamer *MCOS, std::string &FileName,
Files.push_back(FileContent(FileName, Content));
}
-void MCDwarf2BTF::addLines(MCObjectStreamer *MCOS, StringRef &SectionName,
- std::vector<FileContent> &Files,
- const MCLineSection::MCDwarfLineEntryCollection &LineEntries) {
+void MCDwarf2BTF::addLines(
+ MCObjectStreamer *MCOS, StringRef &SectionName,
+ std::vector<FileContent> &Files,
+ const MCLineSection::MCDwarfLineEntryCollection &LineEntries) {
MCContext &Context = MCOS->getContext();
auto &BTFCxt = Context.getBTFContext();
@@ -84,9 +85,11 @@ void MCDwarf2BTF::addDwarfLineInfo(MCObjectStreamer *MCOS) {
FileName = Dirs[File.DirIndex - 1] + "/" + File.Name;
MCDwarf2BTF::addFiles(MCOS, FileName, Files);
}
- for (const auto &LineSec: CUIDTablePair.second.getMCLineSections().getMCLineEntries()) {
+ for (const auto &LineSec :
+ CUIDTablePair.second.getMCLineSections().getMCLineEntries()) {
MCSection *Section = LineSec.first;
- const MCLineSection::MCDwarfLineEntryCollection &LineEntries = LineSec.second;
+ const MCLineSection::MCDwarfLineEntryCollection &LineEntries =
+ LineSec.second;
StringRef SectionName;
if (MCSectionELF *SectionELF = dyn_cast<MCSectionELF>(Section))
OpenPOWER on IntegriCloud