1818#include " llvm/Object/Archive.h"
1919#include " llvm/Object/ArchiveWriter.h"
2020#include " llvm/Object/Binary.h"
21- #include " llvm/BinaryFormat/COFF.h"
2221#include " llvm/Object/COFF.h"
2322#include " llvm/Object/ELFObjectFile.h"
2423#include " llvm/Object/Error.h"
@@ -36,8 +35,8 @@ using namespace llvm::object;
3635namespace {
3736
3837static llvm::TimerGroup
39- ClangOffloadBundlerTimerGroup ( " Clang Offload Bundler Timer Group" ,
40- " Timer group for clang offload bundler" );
38+ OffloadBundlerTimerGroup ( " Offload Bundler Timer Group" ,
39+ " Timer group for offload bundler" );
4140
4241// / Attempts to extract all the embedded device images contained inside the
4342// / buffer \p Contents. The buffer is expected to contain a valid offloading
@@ -107,7 +106,7 @@ Error extractFromObject(const ObjectFile &Obj,
107106 return Error::success ();
108107}
109108
110- // Extract an Offload bundle (usually a Clang Offload Bundle) from a fat_bin
109+ // Extract an Offload bundle (usually a Offload Bundle) from a fat_bin
111110// section
112111Error extractOffloadBundle (MemoryBufferRef Contents, uint64_t SectionOffset,
113112 StringRef fileName,
@@ -267,10 +266,10 @@ Error OffloadFatBinBundle::ReadEntries(StringRef Buffer,
267266 }
268267
269268 // create a Bundle Entry object:
270- auto entry = new OffloadFatBinBundle:: BundleEntry (
271- EntryOffset + SectionOffset, EntrySize, EntryIDSize, EntryID);
269+ auto entry = new BundleEntry (EntryOffset + SectionOffset, EntrySize,
270+ EntryIDSize, EntryID);
272271
273- Entries-> push_back (*entry);
272+ Entries. push_back (*entry);
274273 } // end of for loop
275274
276275 return Error::success ();
@@ -298,8 +297,7 @@ OffloadFatBinBundle::create(MemoryBufferRef Buf, uint64_t SectionOffset,
298297
299298Error OffloadFatBinBundle::extractBundle (const ObjectFile &Source) {
300299 // This will extract all entries in the Bundle
301- SmallVectorImpl<OffloadFatBinBundle::BundleEntry>::iterator it =
302- Entries->begin ();
300+ SmallVectorImpl<BundleEntry>::iterator it = Entries.begin ();
303301 for (int64_t I = 0 ; I < getNumEntries (); I++) {
304302
305303 if (it->Size > 0 ) {
@@ -467,10 +465,6 @@ Error object::extractFatBinaryFromObject(
467465 } else if (Obj.isCOFF ()) {
468466 if (const COFFObjectFile *COFFObj = dyn_cast<COFFObjectFile>(&Obj)) {
469467 const coff_section *CoffSection = COFFObj->getCOFFSection (Sec);
470- fprintf (
471- stderr, " DAVE: COFF viritual address =0x%llX\n " ,
472- CoffSection
473- ->VirtualAddress ); // COFFObj->getCOFFSection(Sec)->VirtualAddress);
474468 }
475469 }
476470
@@ -698,7 +692,7 @@ CompressedOffloadBundle::decompress(llvm::MemoryBufferRef &Input,
698692 " Unknown compressing method" );
699693
700694 llvm::Timer DecompressTimer (" Decompression Timer" , " Decompression time" ,
701- ClangOffloadBundlerTimerGroup );
695+ OffloadBundlerTimerGroup );
702696 if (Verbose)
703697 DecompressTimer.startTimer ();
704698
@@ -720,7 +714,7 @@ CompressedOffloadBundle::decompress(llvm::MemoryBufferRef &Input,
720714 // Recalculate MD5 hash for integrity check
721715 llvm::Timer HashRecalcTimer (" Hash Recalculation Timer" ,
722716 " Hash recalculation time" ,
723- ClangOffloadBundlerTimerGroup );
717+ OffloadBundlerTimerGroup );
724718 HashRecalcTimer.startTimer ();
725719 llvm::MD5 Hash;
726720 llvm::MD5::MD5Result Result;
@@ -775,7 +769,7 @@ CompressedOffloadBundle::compress(llvm::compression::Params P,
775769 " Compression not supported" );
776770
777771 llvm::Timer HashTimer (" Hash Calculation Timer" , " Hash calculation time" ,
778- ClangOffloadBundlerTimerGroup );
772+ OffloadBundlerTimerGroup );
779773 if (Verbose)
780774 HashTimer.startTimer ();
781775 llvm::MD5 Hash;
@@ -792,7 +786,7 @@ CompressedOffloadBundle::compress(llvm::compression::Params P,
792786 Input.getBuffer ().size ());
793787
794788 llvm::Timer CompressTimer (" Compression Timer" , " Compression time" ,
795- ClangOffloadBundlerTimerGroup );
789+ OffloadBundlerTimerGroup );
796790 if (Verbose)
797791 CompressTimer.startTimer ();
798792 llvm::compression::compress (P, BufferUint8, CompressedBuffer);
0 commit comments