mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
llvm-mc: Add statistic for number of fragments emitted by the assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80033 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
533534a295
commit
0adcd35f78
@ -7,11 +7,13 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "assembler"
|
||||
#include "llvm/MC/MCAssembler.h"
|
||||
#include "llvm/MC/MCSectionMachO.h"
|
||||
#include "llvm/Target/TargetMachOWriterInfo.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
@ -21,6 +23,8 @@ using namespace llvm;
|
||||
|
||||
class MachObjectWriter;
|
||||
|
||||
STATISTIC(EmittedFragments, "Number of emitted assembler fragments");
|
||||
|
||||
static void WriteFileData(raw_ostream &OS, const MCSectionData &SD,
|
||||
MachObjectWriter &MOW);
|
||||
|
||||
@ -692,6 +696,8 @@ static void WriteFileData(raw_ostream &OS, const MCFragment &F,
|
||||
uint64_t Start = OS.tell();
|
||||
(void) Start;
|
||||
|
||||
++EmittedFragments;
|
||||
|
||||
// FIXME: Embed in fragments instead?
|
||||
switch (F.getKind()) {
|
||||
case MCFragment::FT_Align: {
|
||||
|
Loading…
Reference in New Issue
Block a user