18
18
#include " llvm/Object/Archive.h"
19
19
#include " llvm/Object/ArchiveWriter.h"
20
20
#include " llvm/Object/Binary.h"
21
- #include " llvm/BinaryFormat/COFF.h"
22
21
#include " llvm/Object/COFF.h"
23
22
#include " llvm/Object/ELFObjectFile.h"
24
23
#include " llvm/Object/Error.h"
@@ -36,8 +35,8 @@ using namespace llvm::object;
36
35
namespace {
37
36
38
37
static 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" );
41
40
42
41
// / Attempts to extract all the embedded device images contained inside the
43
42
// / buffer \p Contents. The buffer is expected to contain a valid offloading
@@ -107,7 +106,7 @@ Error extractFromObject(const ObjectFile &Obj,
107
106
return Error::success ();
108
107
}
109
108
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
111
110
// section
112
111
Error extractOffloadBundle (MemoryBufferRef Contents, uint64_t SectionOffset,
113
112
StringRef fileName,
@@ -267,10 +266,10 @@ Error OffloadFatBinBundle::ReadEntries(StringRef Buffer,
267
266
}
268
267
269
268
// 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);
272
271
273
- Entries-> push_back (*entry);
272
+ Entries. push_back (*entry);
274
273
} // end of for loop
275
274
276
275
return Error::success ();
@@ -298,8 +297,7 @@ OffloadFatBinBundle::create(MemoryBufferRef Buf, uint64_t SectionOffset,
298
297
299
298
Error OffloadFatBinBundle::extractBundle (const ObjectFile &Source) {
300
299
// This will extract all entries in the Bundle
301
- SmallVectorImpl<OffloadFatBinBundle::BundleEntry>::iterator it =
302
- Entries->begin ();
300
+ SmallVectorImpl<BundleEntry>::iterator it = Entries.begin ();
303
301
for (int64_t I = 0 ; I < getNumEntries (); I++) {
304
302
305
303
if (it->Size > 0 ) {
@@ -467,10 +465,6 @@ Error object::extractFatBinaryFromObject(
467
465
} else if (Obj.isCOFF ()) {
468
466
if (const COFFObjectFile *COFFObj = dyn_cast<COFFObjectFile>(&Obj)) {
469
467
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);
474
468
}
475
469
}
476
470
@@ -698,7 +692,7 @@ CompressedOffloadBundle::decompress(llvm::MemoryBufferRef &Input,
698
692
" Unknown compressing method" );
699
693
700
694
llvm::Timer DecompressTimer (" Decompression Timer" , " Decompression time" ,
701
- ClangOffloadBundlerTimerGroup );
695
+ OffloadBundlerTimerGroup );
702
696
if (Verbose)
703
697
DecompressTimer.startTimer ();
704
698
@@ -720,7 +714,7 @@ CompressedOffloadBundle::decompress(llvm::MemoryBufferRef &Input,
720
714
// Recalculate MD5 hash for integrity check
721
715
llvm::Timer HashRecalcTimer (" Hash Recalculation Timer" ,
722
716
" Hash recalculation time" ,
723
- ClangOffloadBundlerTimerGroup );
717
+ OffloadBundlerTimerGroup );
724
718
HashRecalcTimer.startTimer ();
725
719
llvm::MD5 Hash;
726
720
llvm::MD5::MD5Result Result;
@@ -775,7 +769,7 @@ CompressedOffloadBundle::compress(llvm::compression::Params P,
775
769
" Compression not supported" );
776
770
777
771
llvm::Timer HashTimer (" Hash Calculation Timer" , " Hash calculation time" ,
778
- ClangOffloadBundlerTimerGroup );
772
+ OffloadBundlerTimerGroup );
779
773
if (Verbose)
780
774
HashTimer.startTimer ();
781
775
llvm::MD5 Hash;
@@ -792,7 +786,7 @@ CompressedOffloadBundle::compress(llvm::compression::Params P,
792
786
Input.getBuffer ().size ());
793
787
794
788
llvm::Timer CompressTimer (" Compression Timer" , " Compression time" ,
795
- ClangOffloadBundlerTimerGroup );
789
+ OffloadBundlerTimerGroup );
796
790
if (Verbose)
797
791
CompressTimer.startTimer ();
798
792
llvm::compression::compress (P, BufferUint8, CompressedBuffer);
0 commit comments