1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

No functionality change. Rename emitGCNO() to the more sensible

emitProfileNotes(), similar to emitProfileArcs(). Also update its comment.

Also add a comment on Version[4] (there will be another comment in clang later),
and compress lines that exceeded 80 columns.

llvm-svn: 176994
This commit is contained in:
Nick Lewycky 2013-03-13 22:55:42 +00:00
parent 27dd933a64
commit f685b7fe28

View File

@ -66,8 +66,8 @@ namespace {
private: private:
bool runOnModule(Module &M); bool runOnModule(Module &M);
// Create the GCNO files for the Module based on DebugInfo. // Create the .gcno files for the Module based on DebugInfo.
void emitGCNO(); void emitProfileNotes();
// Modify the program to track transitions along edges and call into the // Modify the program to track transitions along edges and call into the
// profiling runtime to emit .gcda files when run. // profiling runtime to emit .gcda files when run.
@ -88,8 +88,8 @@ namespace {
// block number. // block number.
GlobalVariable *buildEdgeLookupTable(Function *F, GlobalVariable *buildEdgeLookupTable(Function *F,
GlobalVariable *Counter, GlobalVariable *Counter,
const UniqueVector<BasicBlock *> &Preds, const UniqueVector<BasicBlock *>&Preds,
const UniqueVector<BasicBlock *> &Succs); const UniqueVector<BasicBlock*>&Succs);
// Add the function to write out all our counters to the global destructor // Add the function to write out all our counters to the global destructor
// list. // list.
@ -101,7 +101,7 @@ namespace {
bool EmitNotes; bool EmitNotes;
bool EmitData; bool EmitData;
char Version[4]; char Version[4]; // This is stored in reverse order for direct emission.
bool UseExtraChecksum; bool UseExtraChecksum;
bool NoRedZone; bool NoRedZone;
bool NoFunctionNamesInData; bool NoFunctionNamesInData;
@ -363,12 +363,12 @@ bool GCOVProfiler::runOnModule(Module &M) {
this->M = &M; this->M = &M;
Ctx = &M.getContext(); Ctx = &M.getContext();
if (EmitNotes) emitGCNO(); if (EmitNotes) emitProfileNotes();
if (EmitData) return emitProfileArcs(); if (EmitData) return emitProfileArcs();
return false; return false;
} }
void GCOVProfiler::emitGCNO() { void GCOVProfiler::emitProfileNotes() {
NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu"); NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu");
if (!CU_Nodes) return; if (!CU_Nodes) return;